Skip to content

Commit

Permalink
MDL-66542 lib: Fix quote escaping in JS quote helper
Browse files Browse the repository at this point in the history
  • Loading branch information
t-schroeder committed Sep 30, 2019
1 parent 31f8f75 commit c913125
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/templates.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/src/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ define([
// Escape the {{ and the ".
// This involves wrapping {{, and }} in change delimeter tags.
content = content
.replace('"', '\\"')
.replace(/"/g, '\\"')
.replace(/([\{\}]{2,3})/g, '{{=<% %>=}}$1<%={{ }}=%>')
.replace(/(\r\n|\r|\n)/g, '&#x0a;')
;
Expand Down

0 comments on commit c913125

Please sign in to comment.