diff --git a/rfc3986.rl b/rfc3986.rl index 8171bba5..321c261a 100644 --- a/rfc3986.rl +++ b/rfc3986.rl @@ -34,7 +34,9 @@ sub_delim = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "="; # double quote is allowed here because it's quite common in real life and # we don't have a great way to work around it here. - pchar = unreserved | pct_encoded | sub_delim | ':' | '@' | '"'; + # + # pchar = unreserved | pct_encoded | sub_delim | ':' | '@' | '"'; + pchar = (any - ('%' | '/' | '?' | '#')) | pct_encoded; ## Atoms reg_name = (unreserved | pct_encoded | sub_delim)*; diff --git a/test/uri.cpp b/test/uri.cpp index 95c65d79..efb74d8a 100644 --- a/test/uri.cpp +++ b/test/uri.cpp @@ -357,6 +357,9 @@ test_validity (cruft::TAP::logger &tap) "http://example.com/???", "http://example.com/?#?", "http://example.com/%22", + + // Out of spec, but required + "/topic/emmanuel-jean-michel-frédéric-macron-2wc", }; for (auto const &good: GOOD)