Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ protected function filterUnsafeUrlInAttribute(array $Element, $attribute)

protected static function escape($text, $allowQuotes = false)
{
return htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8');
return htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8', false);
}

protected static function striAtStart($string, $needle)
Expand Down
3 changes: 2 additions & 1 deletion test/data/image_reference.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<p><img src="/md.png" alt="Markdown Logo" /></p>
<p>![missing reference]</p>
<p>![missing reference]</p>
<p><img src="/md.png" alt="Markdown Logo with html entity as used in french&nbsp;!" /></p>
4 changes: 3 additions & 1 deletion test/data/image_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

[image]: /md.png

![missing reference]
![missing reference]

![Markdown Logo with html entity as used in french&nbsp;!][image]