-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.11.8, 4.0.2
-
None
-
MOODLE_311_STABLE, MOODLE_400_STABLE
Scenario:
- Login as admin, turn debugging on (DEVELOPER level + Display debug messages),
- Create a course with a backslash \ character included in its full / long name.
- Add an activity with a due date (e.g. Assignment).
- Enrol Student A.
- Log in as Student A.
- Visit the Dashboard/Timeline page (Moodle 4) or the Dashboard page containing the Timeline block (Moodle 3).
- Instead of properly loading, Moodle will show a modal with an alert like this:
JSON.parse: bad escaped character at line 1 column 146 of the JSON data
File: https://YOUR_MOODLE_URL/lib/requirejs.php/1660337173/core/first.js
Line: 17
Stack trace:
ln: 6772
https://YOUR_MOODLE_URL/lib/requirejs.php
Renderer.prototype.stringHelper
ln: 7005
https://YOUR_MOODLE_URL/lib/requirejs.php
Renderer.prototype.cleanStringHelper
ln: 8305
https://YOUR_MOODLE_URL/lib/requirejs.php
Renderer.prototype.addHelperFunction/</<
ln: 8035
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderSection
ln: 6836
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderTokens
ln: 9198
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderPartial
ln: 6995
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderTokens
ln: 7634
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderSection
ln: 6836
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderTokens
ln: 9198
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderPartial
ln: 6995
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderTokens
ln: 7634
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderSection
ln: 6836
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.renderTokens
ln: 6556
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/Writer.prototype.render
ln: 10893
https://YOUR_MOODLE_URL/lib/requirejs.php
factory/mustache.render
ln: 10546
https://YOUR_MOODLE_URL/lib/requirejs.php
Renderer.prototype.doRender/<
ln: 30005
https://YOUR_MOODLE_URL/lib/javascript.ph
e
ln: 30307
https://YOUR_MOODLE_URL/lib/javascript.ph
Deferred/then/l/</t<
Also checked: Calendar, My courses page (M4) + Dashboard/Course overview (M3), Recently accessed courses block, Upcoming activities course block - no issues there.
- duplicates
-
MDL-67640 Course names containing "\" symbol causing JSON error in block_timeline
- Closed