Skip to content

Commit fdf0782

Browse files
authored
Remove risky output text handling in emoji replacer
Removed $sce trust from output text in emoji replacer.
1 parent 5b4f8b5 commit fdf0782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modern Development/Service Portal Widgets/Emoji Replacer Widget/Client Script.cs renamed to Modern Development/Service Portal Widgets/Emoji Replacer Widget/Client Script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api.controller=function($scope,$sce) {
1+
api.controller=function($scope) {
22
/* widget controller */
33
var c = this;
44

@@ -20,6 +20,6 @@
2020
var regex = new RegExp(key.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1"),'g');
2121
text = text.replace(regex,c.emojiMap[key]);
2222
}
23-
c.outputText= $sce.trustAsHtml(text);
23+
c.outputText= text;
2424
}
2525
};

0 commit comments

Comments
 (0)