Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Works in Firefox, not in Chrome (at least on MacOS).


What about

  data:text/html,<script>alert(2+2)</script>

?


Works in both Chrome and Firefox.


Doesn't work in Chrome (edit: or Firefox for that matter) for Windows either... that's a shame. Abusing javascript: is a really useful trick for lots of little hacks.


It's also an attack vector for hacks. You can enable it on some browsers if you please, but having it off by default is sensible...


Works if you type it out. If you paste it, the "javascript:" part will be omitted.


Above works even if you paste it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: