From 0cb468469840bd17521ef5d49fa9dba3aa2ed157 Mon Sep 17 00:00:00 2001 From: Jason Westbrook Date: Wed, 4 Apr 2018 12:37:26 -0700 Subject: [PATCH] if the env option `ALLOW_SCRIPTS_IN_USER_INPUT` or `REDASH_ALLOW_SCRIPTS_IN_USER_INPUT` is set to True, trust the text as html --- client/app/filters/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/filters/markdown.js b/client/app/filters/markdown.js index f65680027c..d8c76869a6 100644 --- a/client/app/filters/markdown.js +++ b/client/app/filters/markdown.js @@ -9,7 +9,7 @@ export default function init(ngModule) { let html = markdown.toHTML(String(text)); if (clientConfig.allowScriptsInUserInput) { - html = $sce.trustAsHtml(html); + html = $sce.trustAsHtml(text); } return html;