File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ module.exports = function(grunt) {
69
69
globals : {
70
70
head : false ,
71
71
module : false ,
72
- console : false
72
+ console : false ,
73
+ unescape : false
73
74
}
74
75
} ,
75
76
files : [ 'Gruntfile.js' , 'js/reveal.js' ]
Original file line number Diff line number Diff line change @@ -3300,17 +3300,20 @@ var Reveal = (function(){
3300
3300
getQueryHash : function ( ) {
3301
3301
var query = { } ;
3302
3302
3303
- location . search . replace ( / [ A - Z 0 - 9 ] + ?= ( \w * ) / gi, function ( a ) {
3303
+ location . search . replace ( / [ A - Z 0 - 9 ] + ?= ( [ \w \. % - ] * ) / gi, function ( a ) {
3304
3304
query [ a . split ( '=' ) . shift ( ) ] = a . split ( '=' ) . pop ( ) ;
3305
3305
} ) ;
3306
3306
3307
3307
// Basic deserialization
3308
3308
for ( var i in query ) {
3309
3309
var value = query [ i ] ;
3310
+
3311
+ query [ i ] = unescape ( value ) ;
3312
+
3310
3313
if ( value === 'null' ) query [ i ] = null ;
3311
3314
else if ( value === 'true' ) query [ i ] = true ;
3312
3315
else if ( value === 'false' ) query [ i ] = false ;
3313
- else if ( ! isNaN ( parseFloat ( value ) ) ) query [ i ] = parseFloat ( value ) ;
3316
+ else if ( value . match ( / ^ \d + $ / ) ) query [ i ] = parseFloat ( value ) ;
3314
3317
}
3315
3318
3316
3319
return query ;
You can’t perform that action at this time.
0 commit comments