-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render html tags inside img alt as their original text (#979)
Spec is not clear on how to handle this. Three variations exist: ``` $ echo '![text <textarea> text](image.png)' | /home/user/commonmark.js/bin/commonmark <p><img src="image.png" alt="text <textarea> text" /></p> $ echo '![text <textarea> text](image.png)' | /home/user/cmark/build/src/cmark <p><img src="image.png" alt="text <textarea> text" /></p> $ echo '![text <textarea> text](image.png)' | /home/user/.local/bin/commonmark <p><img src="image.png" alt="text text" /></p> ``` Prior to this commit: - when HTML tags are enabled, tags were removed (as in Haskell version) - when HTML tags are disabled, tags were escaped (as in C version) After this commit: - tags will be escaped (as in C version) regardless of HTML flag + render hardbreaks as newlines, same as cmark
- Loading branch information
Showing
3 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters