w3c / web-share-target

Web API proposal for receiving shared data
https://w3c.github.io/web-share-target/
Other
191 stars 20 forks source link

Replace Placeholders algorithm needs to validate that keys are identifiers #35

Closed mgiuca closed 6 years ago

mgiuca commented 6 years ago

In the replace placeholders algorithm, the key is not validated; it can contain any characters other than }.

Elsewhere in the spec, we say:

Each field MUST be a valid WebIDL identifier...

But we don't validate this in an algorithm.

This check should be added between steps 1.5 and 1.6 of the replace plaeholders algorithm.