Skip to content

Make pasting inline into <script> tag possible #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2014

Conversation

gabrielschulhof
Copy link

@@ -370,7 +370,7 @@
iframe_doc.open();

// Set document.domain for the Iframe document as well, if necessary.
domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
domain && iframe_doc.write( '<scr' + 'ipt>document.domain="' + domain + '"</scr' + 'ipt>' );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on IRC, prefer \x3script to the concatenation

The browser interprets the occurrence of the literal "</script>" inside of the
body of a script tag as the end of the script, so the leading "<" must be
escaped by replacing it with \x3c
@gseguin gseguin changed the title Broke up <script> and </script> so script can be pasted into HTML doc Make pasting inline into <script> tag possible Apr 8, 2014
@gseguin gseguin merged commit 2da0c56 into gseguin:master Apr 8, 2014
gabrielschulhof pushed a commit to jquery-archive/jquery-mobile that referenced this pull request Apr 8, 2014
Grab the version of jquery.hashchange.js that includes
gseguin/jquery-hashchange#1 which will cause the built
library to be inline-able.

Fixes gh-7300
gabrielschulhof pushed a commit to jquery-archive/jquery-mobile that referenced this pull request Apr 8, 2014
Grab the version of jquery.hashchange.js that includes
gseguin/jquery-hashchange#1 which will cause the built
library to be inline-able.

Fixes gh-7300

(cherry picked from commit 400c856)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants