Skip to content

Sanitization strips out actual content #1

@smrq

Description

@smrq

The sanitization is a bit overzealous, which can remove real content. Example:

render('```sh\n$ gulp test\n```');

Yields

<pre><code class="lang-sh">$ gulp \n</code></pre>\n

The word "test" is removed because pre-sanitization it looks like...

<pre><code class="lang-sh">$ gulp <span class="hljs-built_in">test</span>\n</code></pre>\n

Note the underscore in the hljs-built_in class, which doesn't match the regexp in the sanitizer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions