|
|
@ -20,10 +20,13 @@ const HELPERS = [ |
|
|
// this help is applied to all statements
|
|
|
// this help is applied to all statements
|
|
|
new Helper(HelperFunctionNames.ALL, value => { |
|
|
new Helper(HelperFunctionNames.ALL, value => { |
|
|
// null/undefined values produce bad results
|
|
|
// null/undefined values produce bad results
|
|
|
if (value == null) { |
|
|
if (value == null || typeof value !== "string") { |
|
|
return "" |
|
|
return value || "" |
|
|
} |
|
|
} |
|
|
let text = new SafeString(unescape(value).replace(/&/g, "&")) |
|
|
if (value && value.string) { |
|
|
|
|
|
value = value.string |
|
|
|
|
|
} |
|
|
|
|
|
let text = new SafeString(value.replace(/&/g, "&")) |
|
|
if (text == null || typeof text !== "string") { |
|
|
if (text == null || typeof text !== "string") { |
|
|
return text |
|
|
return text |
|
|
} |
|
|
} |
|
|
|