Skip to content
Snippets Groups Projects
Commit 926add49 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Escape error messages after stripping html tags

parent e718b6ad
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ export const handleXhrError = (jqXHR, textStatus, errorThrown, icon = "sad") => ...@@ -35,7 +35,7 @@ export const handleXhrError = (jqXHR, textStatus, errorThrown, icon = "sad") =>
notify({ notify({
"summary": i18n.t('error.summary'), "summary": i18n.t('error.summary'),
"body": stripHTML(body), "body": escapeHTML(stripHTML(body)),
"icon": icon, "icon": icon,
"type": "danger", "type": "danger",
}); });
...@@ -84,7 +84,7 @@ export const handleFetchError = async (error, summary = "", icon = "sad") => { ...@@ -84,7 +84,7 @@ export const handleFetchError = async (error, summary = "", icon = "sad") => {
notify({ notify({
"summary": summary === "" ? i18n.t('error.summary') : summary, "summary": summary === "" ? i18n.t('error.summary') : summary,
"body": stripHTML(body), "body": escapeHTML(stripHTML(body)),
"icon": icon, "icon": icon,
"type": "danger", "type": "danger",
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment