diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index f27e6ae98..80167d4ab 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -363,10 +363,10 @@ exports.getRelativeDate = function(delta) { }; }; -// Convert & to "&", < to "<", > to ">" and " to """ +// Convert & to "&", < to "<", > to ">", " to """ ' to "'" exports.htmlEncode = function(s) { if(s) { - return s.toString().replace(/&/mg,"&").replace(//mg,">").replace(/\"/mg,"""); + return s.toString().replace(/&/mg,"&").replace(//mg,">").replace(/\"/mg,""").replace(/\'/mg,"'"); } else { return ""; }