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