inline JavaScript

inline JavaScript

by Kristen Eshleman -
Number of replies: 1

Moodle adds // <![CDATA[ to our inline JavaScript within our html pages which disables the Javascript statements. Is there a way to stop Moodle from making this change to the HTML?

Average of ratings: -
In reply to Kristen Eshleman

Re: inline JavaScript

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That does no break JavaScript.

On the contrary, wrapping the JavaScript in a CDATA seciton is essential if you want the output to be valid XHTML.

If your JavaScript is not working, the problem is something else.