-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: sanitize highlight text #71
fix: sanitize highlight text #71
Conversation
Need to figure out how to do this |
Usually if the library sanitizes the HTML, it replaces all HTML entities with their equivalent, such as < becoming < If this one doesn't do that, we should find one that does. |
it does do it but if the sanitized text is passed to opengraph/src/social-card/templates/highlight-card.template.ts Lines 20 to 22 in 0fbbc75
We can also just escape the html... |
@takanome-dev Ok, try escaping the HTML and see if that works. If so, we can go with that |
Done π |
@takanome-dev instead of discarding them, is there no option to sanitize them as-is? So |
That's what I have been trying to do. The |
Ok. I see more how |
@takanome-dev did you find anymore alternatives here? |
@brandonroberts sorry for the late response. Unfortunately, I didn't find any alternative or a way to display the html as a text in the generated og image. |
Ok cool. No problem |
Closing this for now as there has been no movement since late August. Feel free to reopen @brandonroberts @takanome-dev if work resumes. |
Description
This PR fixes the issue with sanitizing the highlighted text. The code has been modified to ensure that the text is properly sanitized, preventing any potential security vulnerabilities. This improvement enhances the overall security of the application.
Generated using OpenSauced.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #66
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?