Advertisement
Guest User

jqm issue #1383 error repo code

a guest
Jan 2nd, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <meta name=viewport content="user-scalable=no,width=device-width" />
  5.  
  6.   <!-- This issue is present in jqm v1.1.0 also, change the URLs to verify: -->
  7.   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
  8.   <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
  9.   <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  10. </head>
  11.  
  12. <body>
  13.  
  14. <div data-role=page id=home>
  15.   <div data-role=header>
  16.     <h1>Home</h1>
  17.   </div>
  18.  
  19.   <div data-role=content>
  20.           <p> <strong>Sample page to show single quote in query string bug in
  21.             <br/>
  22.             jquery.mobile-1.2.0.js Line 3526:</strong>
  23.             <br/> <br/>
  24.             // Check to see if the page already exists in the DOM.
  25.             <br/>
  26.             // NOTE do _not_ use the :jqmData psuedo selector because parenthesis
  27.             <br/>
  28.             //      are a valid url char and it breaks on the first occurence
  29.             <br/>
  30.     page = settings.pageContainer.children("[data-" + $.mobile.ns + "url='" + dataUrl + "']");
  31.             <br/>
  32.  </p>
  33.     <a href="#win2?name=o'reilly"> Goto window 2 with single quote in query string fails </a>
  34.     <p>
  35.     with this error: Uncaught Error: Syntax error, unrecognized expression: data-url='win2?name=o'reilly']
  36.     <br/>
  37.     or will cause page to crash in some instances.
  38.     <br/>
  39.     </p>
  40.     <a href="#win2?name=oreilly"> Goto window 2 without single qoute works correctly </a>
  41.   </div>
  42. </div>
  43.  
  44. <div data-role=page id=win2 data-add-back-btn=true>
  45.   <div data-role=header>
  46.     <h1>Window 2</h1>
  47.   </div>
  48.  
  49.   <div data-role=content>
  50.     <p> Window content 2 </p>
  51.     <a href="#home"> Goto Home located in the same page </a>
  52.   </div>
  53. </div>
  54. <!-- for debugging but not required:
  55. <script> console.log($.mobile); </script> -->
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement