Fix HTML escaping in renderer crashing on non-string values

This commit is contained in:
chylex 2016-10-27 13:26:55 +02:00
parent 4dda9a6167
commit da8027163e

View File

@ -52,7 +52,7 @@ var DOM = (function(){
* Converts characters to their HTML entity form.
*/
escapeHTML: function(html){
return html.replace(entityRegex, s => entityMap[s]);
return String(html).replace(entityRegex, s => entityMap[s]);
}
};
})();