mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Fix html entities double encoding in html attributes
This commit is contained in:
parent
6598f3860c
commit
11ac7f6a59
@ -1918,7 +1918,7 @@ class Parsedown
|
||||
|
||||
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)
|
||||
|
@ -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 !" /></p>
|
@ -2,4 +2,6 @@
|
||||
|
||||
[image]: /md.png
|
||||
|
||||
![missing reference]
|
||||
![missing reference]
|
||||
|
||||
![Markdown Logo with html entity as used in french !][image]
|
Loading…
Reference in New Issue
Block a user