|
@ -181,7 +181,14 @@ function normalizeLink(url) { |
|
|
|
|
|
|
|
|
// Encoder throws exception on broken surrogate pairs.
|
|
|
// Encoder throws exception on broken surrogate pairs.
|
|
|
// Fix those first.
|
|
|
// Fix those first.
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
return encodeURI(fixBrokenSurrogates(normalized)); |
|
|
return encodeURI(fixBrokenSurrogates(normalized)); |
|
|
|
|
|
} catch (__) { |
|
|
|
|
|
// This should never happen and left for safety only.
|
|
|
|
|
|
/*istanbul ignore next*/ |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|