-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Description
When using tag attributes, for example when the value of the name attribute contains a double quote ("), parsing fails even if the quote is escaped with a backslash (\) (added via addslashes).
This makes it impossible to use usernames or display names that contain double quotes.
Reproduction
[mention id=1 name="foo\"ff\""][/mention]
Expected Behavior
The value of name should be parsed as:
foo"ff"
Actual Behavior
Parsing fails and the original text is returned unchanged.
Impact
- Double quotes cannot be safely used inside attribute values
Notes
- Escaping with
\"has already been tried - The only possible workaround seems to be adjusting
TOKEN_DELIMITER - I am using
RegularParser
Workaround
- Use content instead of an attribute
[mention id=1]foo"ff"[/mention]
This currently works.
Metadata
Metadata
Assignees
Labels
No labels