Catch URLs that uses U+2013 that breaks Graphite (#2943)
This commit is contained in:
parent
d049ce87ae
commit
afccd8225f
|
|
@ -8,7 +8,8 @@ function joinNonEmpty(strings, delimeter) {
|
|||
}
|
||||
|
||||
function toSafeKey(key) {
|
||||
return key.replace(/[.~ /+|,:?&%)(]|%7C/g, '_');
|
||||
// U+2013 : EN DASH – as used on https://en.wikipedia.org/wiki/2019–20_coronavirus_pandemic
|
||||
return key.replace(/[.~ /+|,:?&%–)(]|%7C/g, '_');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const flatten = require('./flattenMessage');
|
|||
|
||||
module.exports = {
|
||||
toSafeKey(key, safeChar = '_') {
|
||||
return key.replace(/[.~ /+|,:?&%]|%7C/g, safeChar);
|
||||
return key.replace(/[.~ /+|,:?&%–]|%7C/g, safeChar);
|
||||
},
|
||||
getConnectivity(options) {
|
||||
// if we have a friendly name for your connectivity, use that!
|
||||
|
|
|
|||
Loading…
Reference in New Issue