@@ -356,24 +356,23 @@ define( [
356
356
// TODO consider supporting a custom callback
357
357
var fileUrl = this . _createFileUrl ( absUrl ) ,
358
358
dataUrl = this . _createDataUrl ( absUrl ) ,
359
- decodedDataUrl = this . window [ 0 ] . decodeURIComponent ( dataUrl ) ,
360
359
page , initialContent = this . _getInitialContent ( ) ;
361
360
362
361
// Check to see if the page already exists in the DOM.
363
362
// NOTE do _not_ use the :jqmData pseudo selector because parenthesis
364
363
// are a valid url char and it breaks on the first occurence
365
364
page = this . element
366
365
. children ( "[data-" + this . _getNs ( ) +
367
- "url='" + $ . mobile . path . hashToSelector ( decodedDataUrl ) + "']" ) ;
366
+ "url='" + $ . mobile . path . hashToSelector ( dataUrl ) + "']" ) ;
368
367
369
368
// If we failed to find the page, check to see if the url is a
370
369
// reference to an embedded page. If so, it may have been dynamically
371
370
// injected by a developer, in which case it would be lacking a
372
371
// data-url attribute and in need of enhancement.
373
372
if ( page . length === 0 && dataUrl && ! $ . mobile . path . isPath ( dataUrl ) ) {
374
373
page = this . element . children ( $ . mobile . path . hashToSelector ( "#" + dataUrl ) )
375
- . attr ( "data-" + this . _getNs ( ) + "url" , decodedDataUrl )
376
- . jqmData ( "url" , decodedDataUrl ) ;
374
+ . attr ( "data-" + this . _getNs ( ) + "url" , dataUrl )
375
+ . jqmData ( "url" , dataUrl ) ;
377
376
}
378
377
379
378
// If we failed to find a page in the DOM, check the URL to see if it
@@ -449,9 +448,7 @@ define( [
449
448
// TODO tagging a page with external to make sure that embedded pages aren't
450
449
// removed by the various page handling code is bad. Having page handling code
451
450
// in many places is bad. Solutions post 1.0
452
- page . attr ( "data-" + this . _getNs ( ) + "url" ,
453
- this . window [ 0 ] . decodeURIComponent (
454
- this . _createDataUrl ( fileUrl ) ) )
451
+ page . attr ( "data-" + this . _getNs ( ) + "url" , this . _createDataUrl ( fileUrl ) )
455
452
. attr ( "data-" + this . _getNs ( ) + "external-page" , true ) ;
456
453
457
454
return page ;
0 commit comments