We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
renderer.rules
I want to add some basic safety checks to what HTML tags and attributes are allowed. Some playing around has shown that I can do something like this:
const original = instance.renderer.rules.htmltag; instance.renderer.rules.htmltag = function myHtmltag(tokens, idx /*, options, env */) { const content = tokens[idx].content; if (someMagicTest(content)) { return original(tokens, idx); } else { return escapeHtml(content); } };
However, it's not abundantly clear to me if this is an approved method, and I don't want to build on a private API that is subject to change.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to add some basic safety checks to what HTML tags and attributes are allowed. Some playing around has shown that I can do something like this:
However, it's not abundantly clear to me if this is an approved method, and I don't want to build on a private API that is subject to change.
The text was updated successfully, but these errors were encountered: