-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes xenos seeing raw html on paper #5329
Conversation
Co-authored-by: harryob <[email protected]>
Co-authored-by: harryob <[email protected]>
For parity or anyone too lazy to view the comments on the old pr, they are as follows: You also need to check for quotation marks inside of HTML tags. Consider a tag such as . So when you are inside an HTML tag and run into a quotation mark (either single ' or double "), then you advance until you find the matching quotation mark. Perhaps you could add a couple booleans for this, e.g. need_single_quote and need_double_quote. Carefully-crafted user input would make this replace text inside of HTML tags. This should be reworked to be a bit more similar to how /proc/stars works, where the final message is being appended to in the original for loop. In this case, you could be appending scrambled_string from the loop before to a variable representing the final output. I suspect that would also be better performance-wise compared to repeatedly searching through the whole text for replacements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment this works, though it would be nice for at least the <style> block to not get scrambled:
Instead of:
If you would like to try or adapt my experiment supporting this, git apply
this patch:
patch.diff.txt
Test procedure:
- Load USS Runtime
Spawn "faxmachine
- Send a blank fax
- Admin reply to it with custom message w/ HTML
- Inspect reply with a xeno
About the pull request
Continuation of #4654 , to fix #4609 . This fix should make it so that when xenos examine paper it no longer displays a blank page and the raw html was replaced with the formatted scrambled message.
Explain why it's good for the game
raw html is rather ugly
johnwick.mp4
Changelog
🆑
fix: fixes xenos being able to view raw html on paper.
/:cl: