Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't strip HTML classes/style from custom markup #4935
When using a custom renderer (see below), much of the HTML classes are stripped from the rendered code, removing useful style (like coloring). Can we tell the renderer not to do that?
Here's my config:
And the contents of
I've verified that the contents of the output of
This also affects restructuredText rendering with
Output from running the command directly:
Same content in the Gitea page:
The class attributes had been removed by this rule for security, see https://github.com/go-gitea/gitea/blob/master/modules/markup/sanitizer.go#L33 . Please send a PR to change that.
I have produced a local build that solves my issue by adding this line to the sanitizer:
This will allow
To solve @coreagile's original issue,