Open markseuffert opened 10 years ago
I recently hit this same issue: Using the test script:
$my_text = '**foo & bar**';
$parser = new \Michelf\Markdown();
$parser->no_markup = true;
$parser->no_entities = true;
$my_html = $parser->transform($my_text);
echo $my_html;
This outputs:
<p><strong>foo &amp; bar</strong></p>
However I would expect:
<p><strong>foo & bar</strong></p>
Indeed, that shouldn't happen. I'll get down to it eventually, but I'd also be happy to accept a pull request.
Maintaining those two modes is somewhat cumbersome given there's no way to test the non-defaut mode in MDTest.
We don't use no_entities = true
anymore, no encoding problems without it.
I guess it's fixed in Yellow, but this issue about double-encoding is still present in PHP Markdown when no_entities = true
, and is still worth fixing. So I'll keep it open.
Hi,
I was testing how to prevent HTML code in generated output, together with @wunderfeyd. Looks like there's a double encoding when using
no_markup = true
andno_entities = true
.It doesn't happen when using
no_markup = true
only.