-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.8, 4.1.3, 4.2.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-78350-401 -
As identified by MDL-78266, core/dynamic_tabs is combining raw JS with JS contained in script tags. THIS IS WRONG!!!
This comes from the following code:
return Templates.replaceNodeContents(tab, html, js + tabjs);
|
In this case, the tabjs comes from a fragment call returned by the core_dynamic_tabs_get_content web service method fetched in https://github.com/moodle/moodle/blob/master/lib/amd/src/local/repository/dynamic_tabs.js#L33
This returns js in the form:
<script ..>
|
//.. JS here
|
</script>
|
This utimately means we try to add a tag like:
<script ...>
|
<script ..>
|
//.. JS here
|
</script>
|
</script>
|
This is, of course, invalid.
We need to re-evaluate how we add this JS.