-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Tags in javascript are being destroyed #117
Comments
Does anyone with more html experience have any thoughts on this? http://stackoverflow.com/questions/3302648/should-i-use-cdata-in-html5 seems to indicate that the correct way to do this is:
|
Hi Mario and Gareth, Thanks From: Liam Newman [email protected] Does anyone with more html experience have any thoughts on this? http://stackoverflow.com/questions/3302648/should-i-use-cdata-in-html5 seems to indicate that the correct way to do this is: <script type="text/html" id="test"> //TestWe use cookies ]]> </script>— |
An usable solution would be to not really care for CDATA worm–can in this case and update html beautifier to attempt to determine the "type" attribute of the script tags, and leave everything intact if it's not text/javascript (or empty): currently all scripts are passed to js-beautifier as-is. |
Sorry just found your email in a sea of gmail :D CDATA is extremely important since it allows you to display entities "as On 23 April 2013 23:51, S.Dalili [email protected] wrote:
|
Looks like this now fixed. |
Looks like this is broken (still/again?) |
I haven't changed the plugin but I will probably update it soon with new On Mon, Jan 26, 2015 at 11:33 AM, Peter Fern [email protected]
|
Hi,
I grabbed this sample from www.bbc.co.uk website (cookie confirmation section on top):
<script type="text/html" id="test">
<![CDATA[ <div id="mytag"> <h2> Test </h2> <p> We use cookies</p></div> ]]>
</script>
These tags will be completely destroyed if you try it in http://jsbeautifier.org/
The text was updated successfully, but these errors were encountered: