Skip to content

Commit 1056286

Browse files
author
Zerline
committed
Testing with Mathjax.
1 parent 85382cd commit 1056286

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

packages/base-manager/src/manager-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function default_plaintext_sanitize(s: string): string {
4343
* Sanitize HTML-formatted descriptions.
4444
*/
4545
function default_inline_sanitize(html: string): string {
46-
var allowedTags = [
46+
const allowedTags = [
4747
'a',
4848
'abbr',
4949
'b',
@@ -58,7 +58,7 @@ function default_inline_sanitize(html: string): string {
5858
'style',
5959
'ul'
6060
];
61-
var allowedAttributes = {
61+
const allowedAttributes = {
6262
'*': ['aria-*', 'style', 'title'],
6363
a: ['href'],
6464
img: ['src'],

tests/test_sanitizer.ipynb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@
5353
"source": [
5454
"Textarea(description=\"<style type='type/css'>SPAN {color: blue;}</style><img src='jlogo-small.png' title='àçeù' /> <span style='text-decoration:underline;''>underlined</span>\", description_allow_html=True)"
5555
]
56+
},
57+
{
58+
"cell_type": "code",
59+
"execution_count": null,
60+
"metadata": {},
61+
"outputs": [],
62+
"source": [
63+
"VBox((Text(description=\"<strong>$ y < a, x $</strong>\", allow_html=True),\n",
64+
" Text(description=\"$ <strong>y < a, x</strong> $\", description_allow_html=True)\n",
65+
" ))"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": null,
71+
"metadata": {},
72+
"outputs": [],
73+
"source": [
74+
"VBox((Label(\"$ y < a, x > a$\"), HTMLMath(\"<strong>$ y < a, x > a$</strong>\")))"
75+
]
5676
}
5777
],
5878
"metadata": {

0 commit comments

Comments
 (0)