fix(js/util-service): ensure text is a string
This commit is contained in:
parent
8a842d286f
commit
30214a794b
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ angular.module('quay').factory('UtilService', ['$sanitize', function($sanitize)
|
|||
};
|
||||
|
||||
utilService.escapeHtmlString = function(text) {
|
||||
var adjusted = text.replace(/&/g, "&")
|
||||
var textStr = (text || '').toString();
|
||||
var adjusted = textStr.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
|
|
Reference in a new issue