-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.10 regressions, 3.9.10, 3.10.7, 3.11.11, 4.0.5
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MDL-72708_forum-reply-returns-json-error-when-a-forum-subject-has-a-backslash -
Found in Moodle 3.10
When you create a new discussion topic in a forum with a backslash \ in the subject and then reply to this, a JSON error appears: SyntaxError. Unexpected token at position 25.
As a temporary solution we suggested to the users avoid using backslash in forum subjects, but if this can't be avoided it even affects when grading forums.
Error:
jQuery.Deferred exception: Unexpected token in JSON at position 25 SyntaxError: Unexpected token in JSON at position 25
{{ at JSON.parse (<anonymous>)}}
{{ at z.stringHelper (https://URL/lib/requirejs.php/1629225278/core/first.js:20:3752)}}
{{ at z.<anonymous> (https://URL/lib/requirejs.php/1629225278/core/first.js:20:4655)}}
{{ at n.renderSection (https://URL/lib/requirejs.php/1629225278/core/first.js:81:5438)}}
{{ at n.renderTokens (https://URL/lib/requirejs.php/1629225278/core/first.js:81:4625)}}
{{ at n.renderBlock (https://URL/lib/requirejs.php/1629225278/core/first.js:81:6207)}}
{{ at n.renderTokens (https://URL/lib/requirejs.php/1629225278/core/first.js:81:4764)}}
{{ at n.render (https://URL/lib/requirejs.php/1629225278/core/first.js:81:4471)}}
{{ at Object.a.render (https://URL/lib/requirejs.php/1629225278/core/first.js:81:7090)}}
{{ at z.<anonymous> (https://URL/lib/requirejs.php/1629225278/core/first.js:20:6059) undefined}}