Closed mmillican closed 8 years ago
Yes, I know about this problem. As a solution, you can disable default code encoding(add as an option?) I think the best solution to use a list of allowed tags(and attributes).
@mmillican https://github.com/hey-red/markdownsharp/commit/3be28823b7ae6a365626bb047b5a752993389358
Markdown mark = new Markdown(new MarkdownOptions
{
DisableEncodeCodeBlock = true
});
Nuget package has been updated.
If Javascript is not in a code block, it will not be encoded, and therefore executed.
Html.Encode()
the result of Markdown Sharp will essentially double-encode code that's in code blocks.