WICG / scroll-to-text-fragment

Proposal to allow specifying a text snippet in a URL fragment
Other
589 stars 42 forks source link

[Spec] Don't restrict unknown directives #91

Closed bokand closed 4 years ago

bokand commented 4 years ago

In Fragment Directive Grammar we have:

FragmentDirective ::= (TextDirective | UnknownDirective) ("&" FragmentDirective)?
UnknownDirective ::= CharacterString
CharacterString ::= (ExplicitChar | PercentEncodedChar)+
ExplicitChar ::= [a-zA-Z0-9] | "!" | "$" | "'" | "(" | ")" | "*" | "+" | "." | "/" | ":" | ";" | "=" | "?" | "@" | "_" | "~"

With the note: "A ExplicitChar may be any URL code point that is not explicitly used in the TextDirective syntax, that is "&", "-", and ",", which must be percent-encoded."

I believe this implies that we're placing the percent-encode restrictions from the text= directive on any potential future directives. I think we should make it clear that UnknownDirective doesn't require percent encoding "-" or ",".