mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5451a9eff | |||
849a89b121 | |||
28064a63b3 | |||
800aac5b56 | |||
b15d40e8a3 |
@ -568,7 +568,7 @@ class Parsedown
|
|||||||
case 'code_block':
|
case 'code_block':
|
||||||
case 'fenced_code_block':
|
case 'fenced_code_block':
|
||||||
|
|
||||||
$text = htmlentities($element['text'], ENT_NOQUOTES);
|
$text = htmlspecialchars($element['text'], ENT_NOQUOTES, 'UTF-8');
|
||||||
|
|
||||||
strpos($text, "\x1A\\") !== FALSE and $text = strtr($text, $this->escape_sequence_map);
|
strpos($text, "\x1A\\") !== FALSE and $text = strtr($text, $this->escape_sequence_map);
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ class Parsedown
|
|||||||
foreach ($matches as $matches)
|
foreach ($matches as $matches)
|
||||||
{
|
{
|
||||||
$element_text = $matches[1];
|
$element_text = $matches[1];
|
||||||
$element_text = htmlentities($element_text, ENT_NOQUOTES);
|
$element_text = htmlspecialchars($element_text, ENT_NOQUOTES, 'UTF-8');
|
||||||
|
|
||||||
# decodes escape sequences
|
# decodes escape sequences
|
||||||
|
|
||||||
@ -793,4 +793,4 @@ class Parsedown
|
|||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<p>AT&T has an ampersand in their name</p>
|
<p>AT&T has an ampersand in their name</p>
|
||||||
|
<pre><code>Let's play some cards ♠ ♣ ♥ ♦</code></pre>
|
||||||
<p>AT&T is another way to write it</p>
|
<p>AT&T is another way to write it</p>
|
||||||
<p>this & that</p>
|
<p>this & that</p>
|
||||||
<p>4 < 5 and 6 > 5</p>
|
<p>4 < 5 and 6 > 5</p>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
AT&T has an ampersand in their name
|
AT&T has an ampersand in their name
|
||||||
|
|
||||||
|
Let's play some cards ♠ ♣ ♥ ♦
|
||||||
|
|
||||||
AT&T is another way to write it
|
AT&T is another way to write it
|
||||||
|
|
||||||
this & that
|
this & that
|
||||||
|
Reference in New Issue
Block a user