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

Apostrophe in HTML must be encoded with ''' instead of ''' #20

Closed
ohardy opened this issue Nov 12, 2014 · 10 comments
Closed

Apostrophe in HTML must be encoded with ''' instead of ''' #20

ohardy opened this issue Nov 12, 2014 · 10 comments

Comments

@ohardy
Copy link

ohardy commented Nov 12, 2014

CF http://www.w3.org/TR/xhtml1/#C_16

@sberryman
Copy link

This is still an issue and I've finally figured out this package is the culprit.

@ggentzke
Copy link

ggentzke commented Jul 7, 2015

Requires update to entities.json to capture ' on decode and a hook to always choose ' when encoding '. @sberryman the power is in your hands :)

@sberryman
Copy link

Yeah, I finally figured it out... Guess I should have posted my findings here.

@sterling
Copy link

+1

@psolbach
Copy link

psolbach commented Oct 14, 2016

This is still an issue. For a lib that's required by cheerio I find this a bit disconcerting. Scenario here: Corporate email that contains stuff parsed by cheerio, ' renders as plaintext in Outlook environment. This is not valid HTML. What should we do about it? Fork and ping cheerio maintainers?

@fb55
Copy link
Owner

fb55 commented Oct 15, 2016

For cheerio's case, I would like to solve this by implementing cheeriojs/cheerio#863. This module could use a new API as well, which differentiates between encoding and escaping (with the latter only encoding characters that are illegal in HTML).

@lahiru-tennakoon
Copy link

Seems like this is still an issue.. Any particular reason why it has not been fixed yet?
Is there still no way to encode apostrophe to the html code (&#39)?

@fb55
Copy link
Owner

fb55 commented Jul 1, 2020

You probably want to use the escape methods if this is an issue for you.

@fb55 fb55 closed this as completed Jul 1, 2020
@chapmanio
Copy link

Why was this closed? I can't see that it has been "completed" and the escape methods don't work either. Does anyone have any examples to share of achieving this with the in-built methods?

@fb55
Copy link
Owner

fb55 commented Aug 29, 2023

Why don't the escape methods work?

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

No branches or pull requests

8 participants