init.Monk
init.Monk

Reputation: 161

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

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 >?

Upvotes: 3

Views: 3440

Answers (1)

Fu Cheng
Fu Cheng

Reputation: 3395

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.

Upvotes: 2

Related Questions