Skip to content

Fix URL corruption caused by HTML escaping#1124

Open
SyntaxNyah wants to merge 1 commit into
AttorneyOnline:masterfrom
SyntaxNyah:master
Open

Fix URL corruption caused by HTML escaping#1124
SyntaxNyah wants to merge 1 commit into
AttorneyOnline:masterfrom
SyntaxNyah:master

Conversation

@SyntaxNyah
Copy link
Copy Markdown

@SyntaxNyah SyntaxNyah commented May 26, 2026

URLs containing & for example discord and stuff were being corrupted because toHtmlEscaped() was called before
URL detection, turning & into amp. inside link hrefs.

This shit has been pissing me off for far too long. This fix detects urls on the raw message then html escapes only the non url text. Applied to server descriptions and OOC chat. Heres a screenshot of me building the client and testing it and yes the discord link downloaded instead of being an invalid &amp link at least. It works and functions.
image

If merged this would close this #1116 issue. Feel free to review if people want to improve this or just merge as is do what you like. It does build though.

URLs containing & for example discord and stuff were being corrupted because   toHtmlEscaped() was called before
 URL detection, turning & into amp. inside link hrefs.

This shit has been pissing me off for far too long.  This fix detects urls on the raw message then html escapes only the non url text. Applied to server descriptions and OOC chat. Heres a  screenshot of me building the client and testing it and yes the discord link downloaded.
@SyntaxNyah
Copy link
Copy Markdown
Author

I hate QT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant