Git Product home page Git Product logo

jstests's People

Contributors

kangax avatar

Stargazers

Anne Thorpe avatar  avatar RAJESHW avatar Chinedum Onyema avatar Jaffrey avatar José Sousa avatar Zach Barnes avatar vaibhav avatar Abdelrazek avatar tarek hariri avatar boguslav avatar Yajie Xue avatar Ovi Indrei avatar Surya Singh avatar Félix Saparelli avatar  avatar Clay Stewart avatar Alex Castrounis avatar Andrew Gerst avatar Boris Brdarić avatar  avatar Tom Elam avatar Jim avatar Blaze (Balázs Galambosi) avatar learner avatar Noah Perks Sloan avatar Michał Kuklis avatar Garrett Smith avatar Sébastien Grosjean avatar  avatar

Watchers

 avatar Jim avatar Yannick Albert avatar James Cloos avatar  avatar  avatar

jstests's Issues

ETAGO delimiter test: HTML5^​H update

http://kangax.github.com/jstests/etago_delimiter_test/

The full algorithm is described in the HTML spec here and here, but it’s a little hard to read IMHO :)

Anyhow, HTML5^​H now finally standardized the behavior that all browsers implemented in the first place (in spite of what HTML 4.01 prescribed):

  1. This works — the alert message will be shown:

    <script>document.write('<p></p>'); alert(1);</script>
  2. This will prematurely close the <script> element — the alert message won’t be shown:

    <script>document.write('<script></script>'); alert(1);</script>

Again, this is how it has always worked in every browser (as your test case states).

It might be worth updating the page to mention that HTML5^​H standardizes what you already discovered, i.e. that only the </script sequence will terminate the <script> element’s content (depending on the next character), and other </ sequences are fine and safe to use.

See #whatwg chat logs: http://krijnhoetmer.nl/irc-logs/whatwg/20110326#l-353

Update: I’ve published a much more detailed write-up including some interesting (IMHO) edge cases on my blog: http://mathiasbynens.be/notes/etago

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.