Skip to content

Fix incorrect text escaping to markdown pages in the Static Static Site Editor

The problem

We need to modify Toast UI text escaping behavior. Toast UI implements an HTML to Markdown converter in a library called to-mark. to-mark contains several renderers for different type of content, among them text content. If you open the link, you will notice that the text renderer applies several text escape functions that work regardless of the HTML sanitizer. Some of these functions introduce the breaking changes in the Markdown documents.

Example

{:.no\_toc .hidden-md .hidden-lg}

* TOC
{:toc .hidden-md .hidden-lg}

<br>
<br>
\[Text to display\]\[identifier\] will display a link\.

will do the same\. Hover \[Another text\]\[another\-identifier\] the mouse over it to see the title\.

[This link] will do the same as well. It works as the identifier itself.

\[This link\]\[\] \(same as above\)\, has a second pair of empty brackets to indicate that the following parenthesis does not contain a link\.

\[another\-identifier\]: https://example\.com "This example has a title"

\[identifier\]: http://example1\.com

\[this link\]: http://example2\.com

<kbd class="required">Required 🔎</kbd>