diff --git a/packages/base-manager/src/manager-base.ts b/packages/base-manager/src/manager-base.ts index f2b3927beb..431533a591 100644 --- a/packages/base-manager/src/manager-base.ts +++ b/packages/base-manager/src/manager-base.ts @@ -43,7 +43,7 @@ function default_plaintext_sanitize(s: string): string { * Sanitize HTML-formatted descriptions. */ function default_inline_sanitize(html: string): string { - var allowedTags = [ + const allowedTags = [ 'a', 'abbr', 'b', @@ -58,7 +58,7 @@ function default_inline_sanitize(html: string): string { 'style', 'ul' ]; - var allowedAttributes = { + const allowedAttributes = { '*': ['aria-*', 'style', 'title'], a: ['href'], img: ['src'], diff --git a/tests/test_sanitizer.ipynb b/tests/test_sanitizer.ipynb index 5fe1c5b5f5..0759ea3e9a 100644 --- a/tests/test_sanitizer.ipynb +++ b/tests/test_sanitizer.ipynb @@ -53,6 +53,26 @@ "source": [ "Textarea(description=\" underlined\", description_allow_html=True)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "VBox((Text(description=\"$ y < a, x $\", allow_html=True),\n", + " Text(description=\"$ y < a, x $\", description_allow_html=True)\n", + " ))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "VBox((Label(\"$ y < a, x > a$\"), HTMLMath(\"$ y < a, x > a$\")))" + ] } ], "metadata": {