markdown
markdown copied to clipboard
Feature request: allow sanitization configuration
I'd like to be able to pass a configuration option into rdmd.html(text,options)
that lets me turn off some of the sanitization. For example, I'd like to allow iframe
s and script
tags.
Sorry for taking 2 years, but this should be possible with something like:
import { sanitizeSchema } from '@readme/markdown/sanitize.schema'
import * as rdmd from '@readme/markdown'
const schema = sanitizeSchema()
schema.strip = schema.strip.filter(tag => tag !== 'script')
schema.tagNames.push('iframe')
rdmd.html(text, { sanitize: schema })