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

Decode html entities within the excerpt (otherwise they are shown encoded). #468

Closed
wants to merge 1 commit into from

Conversation

scovetta
Copy link
Member

No description provided.

Comment on lines +174 to +175
let excerpt = ((match.excerpt || '') || match.sample)
.replace(/&/g, '&')

Check failure

Code scanning / CodeQL

Double escaping or unescaping

This replacement may produce '&' characters that are double-unescaped [here](1).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL does not like this change.

Yeah, it's a little dangerous to unescape here -- let's hold off on merging until we're confident the data is always encoded when it gets serialized.

@gfs
Copy link
Contributor

gfs commented Jun 22, 2022

CodeQL does not like this change.

@gfs gfs marked this pull request as draft June 30, 2022 01:45
Copy link
Contributor

@gfs gfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending either additional work to satisfy that this doesn't create an issue when unescpaing characters. Potentially obviated by #2 depending on timing.

@gfs gfs closed this Jan 14, 2023
@gfs
Copy link
Contributor

gfs commented Jan 14, 2023

Will be addressed with #2

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.

2 participants