script tag need escaped in javascript to support inline in a html page #4939

Closed
mrduguo opened this Issue Sep 4, 2012 · 2 comments

Projects

None yet

2 participants

@mrduguo
mrduguo commented Sep 4, 2012

When inline the current jquerymobile inside html script tag, it broken due to a script tag not escaped in following line:
https://github.com/jquery/jquery-mobile/blob/master/js/jquery.hashchange.js#L362

The fix is to add a back slash before the forward slash.

Replace:

      domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );

With

      domain && iframe_doc.write( '<script>document.domain="' + domain + '"<\/script>' );

Related background reading:
http://stackoverflow.com/questions/3302648/should-i-use-cdata-in-html5

@gseguin gseguin was assigned Mar 19, 2013
@gseguin
Member
gseguin commented Apr 18, 2013

That would be a bug to file against https://github.com/cowboy/jquery-hashchange, we'll update our copy if it gets fixed.

@gseguin
Member
gseguin commented Apr 18, 2013

Closed #4939

@gseguin gseguin closed this Apr 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment