[WebUI] Escape HTML characters in errors historypull/4917/head
@@ -262,6 +262,10 @@ define(["jquery", "app/common", "app/libft", "footable"], | |||
sortValue: item.ts | |||
} | |||
}; | |||
for (const prop in item) { | |||
if (!{}.hasOwnProperty.call(item, prop)) continue; | |||
if (typeof item[prop] === "string") item[prop] = common.escapeHTML(item[prop]); | |||
} | |||
}); | |||
if (Object.prototype.hasOwnProperty.call(common.tables, "errors")) { | |||
common.tables.errors.rows.load(rows); |
@@ -491,9 +491,7 @@ define(["jquery", "app/common", "footable"], | |||
}); | |||
break; | |||
default: | |||
if (typeof item[prop] === "string") { | |||
item[prop] = common.escapeHTML(item[prop]); | |||
} | |||
if (typeof item[prop] === "string") item[prop] = common.escapeHTML(item[prop]); | |||
} | |||
} | |||