mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-11 05:44:45 +00:00
[PR #588] [CLOSED] Diagrams are not correctly escaped #1124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/588
Author: @tibel
Created: 1/20/2022
Status: ❌ Closed
Base:
master← Head:bugfix/diagrams-escaping📝 Commits (1)
11df002don't use softEscape with BlocksAsDiv📊 Changes
3 files changed (+13 additions, -13 deletions)
View changed files
📝
src/Markdig.Tests/Specs/DiagramsSpecs.generated.cs(+7 -7)📝
src/Markdig.Tests/Specs/DiagramsSpecs.md(+5 -5)📝
src/Markdig/Renderers/Html/CodeBlockRenderer.cs(+1 -1)📄 Description
The issue with diagrams extension is that not all characters are escaped and thus invalid HTML could be generated.
A diagram sample is https://www.nomnoml.com/ that contains
<table>in the diagram text.Currently markdig is not escaping
>but is escaping<.This results in parsing errors in mermaid and nomnoml.
CodeBlockRendererusessoftEsacape=falseand withBlocksAsDivit usessoftEscape=true.According to documentation
BlocksAsDivshould not change escaping behavior.Please let me know when there are questions or something is missing.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.