Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the meaning of "<mce:script type="text/javascript"><!-- --></mce:script>"

Tags:

tinymce

dojo

In the demo codes of dojo 1.6, I found some code like the below:

<mce:script type="text/javascript">
<!--
//other codes
-->
</mce:script>

So, what's the meaning of this kind of codes? And what are the differences between these codes and

<script type="text/javascript"></script >?
like image 653
init.Monk Avatar asked May 19 '26 12:05

init.Monk


1 Answers

Seems that you can read Chinese. me too :-)

If you open the demo page ( http://dojotoolkit.org/documentation/tutorials/1.6/events/demo/query.html ) in browser and view its source code, you can see there is no mce:script tags, just script tag. So the reason is caused by the blog publishing system, when the author paste the JavaScript code to it, it automatically replace the script tag with mce:script tag to avoid XSS attack.

like image 185
Alex Cheng Avatar answered May 23 '26 09:05

Alex Cheng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!