Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0.1
-
Fix Version/s: 2.0.2
-
Component/s: HTML Editor (TinyMCE)
-
Labels:None
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
If you paste some HTML source into TinyMCE containing a script tag with src attribute, like:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
TinyMCE will strip the src attribute and leave <script></script> there.
This happens for all users, including those with trusted content capability.
I believe this is a bug because:
a) Moodle 1.9 used to allow this, and it's necessary for embedding things such as twitter widgets, etc into HTML blocks.
b) If I turn off javascript and circumvent TinyMCE, I can paste my script tags into the textfield and save it without problems. So it's not Moodle that strips it, it's TinyMCE.