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

Strip "smart quotes" #346

Open
JamoCA opened this issue Sep 11, 2024 · 1 comment
Open

Strip "smart quotes" #346

JamoCA opened this issue Sep 11, 2024 · 1 comment

Comments

@JamoCA
Copy link

JamoCA commented Sep 11, 2024

Could a configuration option be added to automatically sanitize smart quotes?

I believe that you could use something like this:

str = str.replace( /\u2018|\u2019|\u201A|\uFFFD/g, "'" );
str = s.replace( /\u201c|\u201d|\u201e/g, '"' );
@JamoCA
Copy link
Author

JamoCA commented Sep 11, 2024

Perhaps an option to remove non-breaking spaces too.

stry = str.replace(/[\u02DC|\u00A0]/g, " ");

NOTE: I prefer using ASCII7 as much as possible.

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

1 participant