Guest User

separator for import statement

a guest
Sep 6th, 2018
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. What characters are allowed between the import statement and the module string?
  2.  
  3.  
  4. Tested Browsers:
  5. o) Chrome
  6. o) Firefox
  7. o) Edge
  8. o) Safari
  9.  
  10. Note: Not all tested browsers were up to date so there could be some results, which do not work in the latest version
  11.  
  12.  
  13. Test case:
  14.  
  15. <script type="module">
  16. import*chr*"data:text/javascript,alert(123)"
  17. </script>
  18.  
  19.  
  20. Results:
  21.  
  22. Chars valid in all browser:
  23. [0x09,0x0a,0x0b,0x0c,0x0d,0x20,0xa0,0x1680,0x2000,0x2001,0x2002,0x2003,0x2004,0x2005,0x2006,0x2007,0x2008,0x2009,0x200a,0x2028,0x2029,0x202f,0x205f,0x3000,0xfeff]
  24.  
  25. Safari + Edge = [0x180e]
  26.  
  27. Firefox = [0xfffe,0x1000c]
Advertisement
Add Comment
Please, Sign In to add comment