ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.03k stars 323 forks source link

Replace 8.1-deprecated utf8_ funcs with mbstring #326

Closed zerocrates closed 1 year ago

zerocrates commented 1 year ago

This is the very simplest replacement of utf8_encode/_decode with their mbstring counterparts: it doesn't attempt to use mbstring more fully in the absence of iconv for encodings beyond ISO 8859-1 or anything like that, nor does it report mbstring's absence in any specific way if we fall down there and it's missing (this could be added of course).

The idea here is just to indicate that a simple replacement does work fine and passes the tests.

See #320, #324

zerocrates commented 1 year ago

Just commenting to note that these are 8.2 deprecations, not 8.1, oops. Not that it changes anything.