Skip to content

Commit

Permalink
Encode html, try scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslavr committed Sep 18, 2024
1 parent 8403c5a commit 8f7211e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/devextreme/js/aspnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@
var EXTENDED_OPEN_TAG = /[<[]%/g,
EXTENDED_CLOSE_TAG = /%[>\]]/g;

function escapeText(text) {
return JSON.stringify(text).replace(/\.$/, '');
}

function acceptText(bag, text) {
if(text) {
bag.push('_.push(', JSON.stringify(text), ');');
bag.push('_.push(', escapeText(text), ');');
}
}

Expand Down

0 comments on commit 8f7211e

Please sign in to comment.