Ensure that urn NID cannot include '.'

This commit is contained in:
Ray Vincent 2021-08-24 13:39:05 -07:00
parent ef42dae296
commit eac0859cd8

View File

@ -26,7 +26,7 @@ inline bool isUriAbsolute(const std::string &documentUri)
*/
inline bool isUrn(const std::string &documentUri) {
static const std::regex pattern(
"^((urn)|(URN)):[a-zA-Z0-9]+[-]{0,1}[\\.a-zA-Z0-9]+(:[-a-zA-Z0-9\\\\._~%!"
"^((urn)|(URN)):[a-zA-Z0-9]+[-]{0,1}[a-zA-Z0-9]+(:[-a-zA-Z0-9\\\\._~%!"
"$&'()\\/*+,;=]+)+(\\?[-a-zA-Z0-9\\\\._~%!$&'()\\/"
"*+,;:=]+){0,1}(#[-a-zA-Z0-9\\\\._~%!$&'()\\/*+,;:=]+){0,1}");