Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name=viewport content="user-scalable=no,width=device-width" />
- <!-- This issue is present in jqm v1.1.0 also, change the URLs to verify: -->
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
- <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
- <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
- </head>
- <body>
- <div data-role=page id=home>
- <div data-role=header>
- <h1>Home</h1>
- </div>
- <div data-role=content>
- <p> <strong>Sample page to show single quote in query string bug in
- <br/>
- jquery.mobile-1.2.0.js Line 3526:</strong>
- <br/> <br/>
- // Check to see if the page already exists in the DOM.
- <br/>
- // NOTE do _not_ use the :jqmData psuedo selector because parenthesis
- <br/>
- // are a valid url char and it breaks on the first occurence
- <br/>
- page = settings.pageContainer.children("[data-" + $.mobile.ns + "url='" + dataUrl + "']");
- <br/>
- </p>
- <a href="#win2?name=o'reilly"> Goto window 2 with single quote in query string fails </a>
- <p>
- with this error: Uncaught Error: Syntax error, unrecognized expression: data-url='win2?name=o'reilly']
- <br/>
- or will cause page to crash in some instances.
- <br/>
- </p>
- <a href="#win2?name=oreilly"> Goto window 2 without single qoute works correctly </a>
- </div>
- </div>
- <div data-role=page id=win2 data-add-back-btn=true>
- <div data-role=header>
- <h1>Window 2</h1>
- </div>
- <div data-role=content>
- <p> Window content 2 </p>
- <a href="#home"> Goto Home located in the same page </a>
- </div>
- </div>
- <!-- for debugging but not required:
- <script> console.log($.mobile); </script> -->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement