Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add html sanitizing [DOCSTOOLS-1350] #177

Merged
merged 4 commits into from
Sep 15, 2022
Merged

feat: add html sanitizing [DOCSTOOLS-1350] #177

merged 4 commits into from
Sep 15, 2022

Conversation

d3m1d0v
Copy link
Member

@d3m1d0v d3m1d0v commented Sep 12, 2022

Adding utility, that sanitizing HTML. By default yfm-transform not sanitize HTML. Use needToSanitizeHtml: true option to enable sanitizing

@d3m1d0v d3m1d0v requested a review from burashka September 12, 2022 11:52
@d3m1d0v d3m1d0v changed the title feat: add html sanitizing feat: add html sanitizing [DOCSTOOLS-1350] Sep 12, 2022
@Postamentovich
Copy link
Contributor

Postamentovich commented Sep 12, 2022

Сan we use the default config for sanitize, but add the ability to extend these configs?
But need to check that all the html that is generated will not be cleaned

);

const allowedAttributes = Array.from(new Set([...htmlAttrs, ...svgAttrs]));
const allowedSchemes = ['conisio', 'jamfselfservice', 'softwarecenter'];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these schemes are not needed all by default

Copy link
Member Author

Choose a reason for hiding this comment

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

I remove them

@d3m1d0v d3m1d0v merged commit 634f7f8 into master Sep 15, 2022
@d3m1d0v d3m1d0v deleted the sanitizehtml branch September 15, 2022 13:30
yndx-birman added a commit to yndx-birman/yfm-transform that referenced this pull request Aug 8, 2023
yndx-birman added a commit to yndx-birman/yfm-transform that referenced this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants