mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Wrap URL parameter decoding in try-catch for safety
This commit is contained in:
parent
e46d7c64ae
commit
f7f2f501f5
@ -2586,8 +2586,13 @@ function OpenSeadragon( options ){
|
||||
sep = part.indexOf( '=' );
|
||||
|
||||
if ( sep > 0 ) {
|
||||
URLPARAMS[ part.substring( 0, sep ) ] =
|
||||
decodeURIComponent( part.substring( sep + 1 ) );
|
||||
var key = part.substring( 0, sep ),
|
||||
value = part.substring( sep + 1 );
|
||||
try {
|
||||
URLPARAMS[ key ] = decodeURIComponent( value );
|
||||
} catch (e) {
|
||||
$.console.error( "Ignoring malformed URL parameter: %s=%s", key, value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user