mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +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:
parent
d3678f6930
commit
a5eba43a65
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user