Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit c3b1939

Browse files
author
Gabriel Schulhof
committed
Navigation: Use data-url retrieved from Ajax request in its encoded form
1 parent 0af3f8a commit c3b1939

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/widgets/pagecontainer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,11 @@ define( [
517517
dataUrlRegex.test( RegExp.$1 ) &&
518518
RegExp.$1 ) {
519519
fileUrl = $.mobile.path.getFilePath( $("<div>" + RegExp.$1 + "</div>").text() );
520+
521+
// We specify that, if a data-url attribute is given on the page div, its value
522+
// must be given non-URL-encoded. However, in this part of the code, fileUrl is
523+
// assumed to be URL-encoded, so we URL-encode the retrieved value here
524+
fileUrl = this.window[ 0 ].encodeURIComponent( fileUrl );
520525
}
521526

522527
//dont update the base tag if we are prefetching

0 commit comments

Comments
 (0)