Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix(plugin-chart-table): anchor should keep href #661

Merged
merged 2 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
"__timestamp": "1968-01-01T00:00:00",
"state": "other",
"gender": "boy",
"name": "Michael",
"name": "<a href=\"https://www.google.com\" target=\"_blank\">Michael</a>",
"total": -35253,
"boys": 35253,
"SUM(num_california)": 0,
Expand Down
8 changes: 4 additions & 4 deletions plugins/plugin-chart-table/src/utils/formatValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { DataColumnMeta } from '../types';
const xss = new FilterXSS({
whiteList: {
...getDefaultWhiteList(),
span: ['style', 'title'],
div: ['style'],
a: ['style'],
img: ['style', 'src', 'alt', 'title', 'width', 'height'],
span: ['style', 'class', 'title'],
div: ['style', 'class'],
a: ['style', 'class', 'href', 'title', 'target'],
img: ['style', 'class', 'src', 'alt', 'title', 'width', 'height'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also allow CSS classnames.

},
stripIgnoreTag: true,
css: false,
Expand Down