Merge branch 'MDL-77003-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE

This commit is contained in:
Andrew Nicols 2023-02-02 08:20:51 +08:00
commit 885d191df2
3 changed files with 3 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -558,8 +558,7 @@ function(
}
// Allow json formatted $a arguments.
// Added double quote after left curly bracket to differentiate between string and JSON string.
if (param.indexOf('{"') === 0) {
if (param.match(/^{\s*"/gm)) {
// If it can't be parsed then the string is not a JSON format.
try {
const parsedParam = JSON.parse(param);