erusev/parsedown — pull request #37 by hkdobrev (2013-11-22 21:12:31+00:00)
Title: Use UTF-8 encoding for htmlspecialchars. See #36.

Prior to PHP 5.4.0 the default encoding for `htmlentities()` and
`htmlspecialchars` is "ISO-8859-1". For PHP 5.4+ is "UTF-8".

This ensures always the right encoding is used no matter the PHP version and
the locale settings.

I have included tests which test both the change from `htmlentities()` to
`htmlspecialshars` and the encoding.

Example output with `htmlentities()` would be:

Let's play some cards ♣ ♠ ♥ ♦

Example output with `htmlentities()` and "ISO-8859-1" encoding would be:

Let's play some cards â? â?£ â?¥ â?¦