Commit a5cc7060 authored by Gary Wong's avatar Gary Wong
Browse files

Fix previous commit to permit standalone authorities (no subauth).

parent 80c4b229
......@@ -217,7 +217,7 @@ sub Generate($$$)
# AllowUnassigned and RFC 3491 Nameprep validation to interpret IRIs,
# but quite frankly I think I've done more than enough RFC chasing already.
$authority =~ tr/A-Z/a-z/;
return undef if $authority !~ /^[0-9A-Za-z][-.0-9A-Za-z]*(?::[-.0-9A-Za-z]+)+$/;
return undef if $authority !~ /^[0-9A-Za-z][-.0-9A-Za-z]*(?::[-.0-9A-Za-z]+)*$/;
return undef if $type !~ /^[-.0-9A-Z_a-z~]+$/;
return undef if $id !~ m{^[-\t\n\r !#$%'()*+,./0-9:;=?\@A-Z_a-z]+$};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment