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