From 30214a794b1f702dbd82a72ee3fcfeccc9d4aad3 Mon Sep 17 00:00:00 2001 From: EvB Date: Mon, 30 Jan 2017 14:10:20 -0500 Subject: [PATCH] fix(js/util-service): ensure text is a string --- static/js/services/util-service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/services/util-service.js b/static/js/services/util-service.js index 8a233de63..760d7a372 100644 --- a/static/js/services/util-service.js +++ b/static/js/services/util-service.js @@ -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, """)