Skip to content
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

Add checks to clean XML reserved characters when used in page metadata #3

Merged
merged 37 commits into from
Nov 9, 2023

Conversation

neonspectra
Copy link
Member

@neonspectra neonspectra commented Nov 8, 2023

A user might want to use XML reserved characters in their page metadata, not realising that this would break the sitemap or RSS feed. This PR implements a cleaner function to ensure such characters are automatically replaced with escape codes at runtime.

Edit:
This PR also adds a new unit test to make sure that the sanitisation actually works so that we don't break it down the line.

@neonspectra
Copy link
Member Author

Moved the sed replacement into a separate PR. It's a good fix, but it turned out to not be the problem here, so it deserves to be its own PR.

@neonspectra
Copy link
Member Author

tested and it works!!

@neonspectra neonspectra force-pushed the 1.1.0 branch 2 times, most recently from 039c259 to 153ac6f Compare November 9, 2023 15:50
@neonspectra
Copy link
Member Author

Time to merge in changes from upstream. Hopefully that doesn't break stuff after the disaster I inflicted on myself to fix my git blame...

@neonspectra
Copy link
Member Author

Added a fancy CI test to check and make sure we don't break this XML sanitisation down the line. Yay unit testing!!

@neonspectra neonspectra merged commit 474aa79 into 1.1.0 Nov 9, 2023
1 check passed
@neonspectra neonspectra deleted the neon/add-xml-cleaner branch November 9, 2023 23:17
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