mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 03:27:49 +08:00
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:
@ -37,7 +37,9 @@ function getQuoteTitle(element) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fixQuotes(str) {
|
function fixQuotes(str) {
|
||||||
return str.replace(/„|“|«|»|”/g, '"').replace(/‘|’/g, "'");
|
// u+201c “
|
||||||
|
// u+201d ”
|
||||||
|
return str.replace(/[\u201C\u201D]/g, '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
function regexSafeStr(str) {
|
function regexSafeStr(str) {
|
||||||
|
Reference in New Issue
Block a user