Skip to content

Commit

Permalink
Testing with Mathjax.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerline committed Jun 15, 2020
1 parent 85382cd commit 1056286
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/base-manager/src/manager-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -58,7 +58,7 @@ function default_inline_sanitize(html: string): string {
'style',
'ul'
];
var allowedAttributes = {
const allowedAttributes = {
'*': ['aria-*', 'style', 'title'],
a: ['href'],
img: ['src'],
Expand Down
20 changes: 20 additions & 0 deletions tests/test_sanitizer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@
"source": [
"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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"VBox((Text(description=\"<strong>$ y < a, x $</strong>\", allow_html=True),\n",
" Text(description=\"$ <strong>y < a, x</strong> $\", description_allow_html=True)\n",
" ))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"VBox((Label(\"$ y < a, x > a$\"), HTMLMath(\"<strong>$ y < a, x > a$</strong>\")))"
]
}
],
"metadata": {
Expand Down

0 comments on commit 1056286

Please sign in to comment.