MDL-65203 template: tab should be quoted to produce valid json

This commit is contained in:
Dongsheng Cai 2021-05-18 20:36:49 +10:00
parent 0b69b37f04
commit ee58790e46
3 changed files with 3 additions and 2 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

@ -576,6 +576,7 @@ define([
// This involves wrapping {{, and }} in change delimeter tags.
content = content
.replace(/"/g, '\\"')
.replace(/\t/g, '	')
.replace(/([{}]{2,3})/g, '{{=<% %>=}}$1<%={{ }}=%>')
.replace(/(\r\n|\r|\n)/g, '&#x0a;')
;