Skip to content

Fix escaped quotes in formatted message parameters.#6547

Open
rhailrake wants to merge 1 commit intospace-wizards:masterfrom
rhailrake:fix/6537-formatted-message-quotes
Open

Fix escaped quotes in formatted message parameters.#6547
rhailrake wants to merge 1 commit intospace-wizards:masterfrom
rhailrake:fix/6537-formatted-message-quotes

Conversation

@rhailrake
Copy link
Copy Markdown
Contributor

@rhailrake rhailrake commented May 4, 2026

Fixes #6537.

Quoted string parameters now parse escaped characters correctly.
This makes markup like [tag="te\"xt"] parse normally instead of failing or falling back to text in permissive parsing.

String parameter serialization now escapes quotes only inside parameter values, so ToMarkup() round-trips quoted parameter values correctly without changing plain text escaping.

Copy link
Copy Markdown
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer if " was only escaped when inside a parameter, instead of in all cases.

@rhailrake rhailrake force-pushed the fix/6537-formatted-message-quotes branch from 90db1e6 to 108019e Compare May 6, 2026 05:08
@rhailrake
Copy link
Copy Markdown
Contributor Author

I think I'd prefer if " was only escaped when inside a parameter, instead of in all cases.

Sure! Adjusted this so \" is only treated as an escape inside quoted string parameters. EscapeText no longer escapes plain text quotes, and I added coverage for both plain text quotes and quoted parameter round-tripping.

@rhailrake rhailrake requested a review from PJB3005 May 6, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no escaping for double quotes in formatted message attributes

2 participants