-
Notifications
You must be signed in to change notification settings - Fork 194
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
[Bug] Implement selective escape for sanitizing titles and descriptions #301
Conversation
Size Change: +201 kB (+5%) 🔍 Total Size: 3.96 MB
ℹ️ View Unchanged
|
Visit the preview URL for this PR (updated for commit 0d822b5): https://docusaurus-openapi-36b86--pr301-5616eb4s.web.app (expires Thu, 17 Nov 2022 13:38:54 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
@sserrata Tested with IOT and the expected behavior looks great. Although, I did notice a similar issue for our I can push up these changes if they check out 👍 |
Nice! Feel free to push the changes. |
Just need to make sure we have enough coverage of HTML and any potential Docusaurus-specific tags. |
I believe the |
Description
See #299 for background.
This PR implements selective replace for
<
and>
characters in order to preserve support for inline HTML. Previously,lodash
escape()
was being used to HTML-encode all special characters, which broke inline-HTML.Motivation and Context
Renders titles and descriptions as intended, including HTML.
How Has This Been Tested?
Tested with Petstore and IOT APIs but more testing will be welcomed to ensure no regression bugs are introduced.
Additional testing with Threat Prevention API.