FIX: only replaces double quotes and uses unicode (#14644)

`’` is actually not converted and doesn’t need to be normalised to `'`
This commit is contained in:
Joffrey JAFFEUX 2021-10-19 11:01:46 +02:00 committed by GitHub
parent d3678f6930
commit a5eba43a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,9 @@ function getQuoteTitle(element) {
}
function fixQuotes(str) {
return str.replace(/„|“|«|»|”/g, '"').replace(/|/g, "'");
// u+201c “
// u+201d ”
return str.replace(/[\u201C\u201D]/g, '"');
}
function regexSafeStr(str) {