Skip to content

Commit

Permalink
Merge pull request #330 from diplodoc-platform/sanitize-css-variables
Browse files Browse the repository at this point in the history
fix: add openapi variable
  • Loading branch information
v8tenko authored Nov 10, 2023
2 parents 60058e9 + e3968e9 commit a8c29a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/transform/sanitize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,11 @@ const svgAttrs = [
'to',
];

const defaultCssWhitelist = {
...cssfilter.whiteList,
'--method': true,
};

const yfmHtmlAttrs = ['note-type', 'yfm2xliff-explicit', 'term-key'];

const allowedTags = Array.from(
Expand All @@ -503,7 +508,7 @@ export const defaultOptions: SanitizeOptions = {
},
allowVulnerableTags: true,
parser: defaultParseOptions,
cssWhiteList: cssfilter.whiteList,
cssWhiteList: defaultCssWhitelist,
};

function sanitizeStyleTags(dom: cheerio.CheerioAPI, cssWhiteList: CssWhiteList) {
Expand Down

0 comments on commit a8c29a4

Please sign in to comment.