Merge branch 'MDL-77003-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user