ttrss/classes
Chih-Hsuan Yen d4da4dcc32 Fix sanitizer with libxml2 >= 2.12.0
Somehow with newer libxml2, `<?xml encoding="UTF-8">` no longer enforces
UTF-8. Instead, non-ASCII contents are treated as ISO-8859-1 and get
broken.

For example, `<p>中文</p>` becomes
`<p>&auml;&cedil;&shy;&aelig;&#150;&#135;</p>` (should be
`<p>&#20013;&#25991;</p>`).

Switching to another trick mentioned on [1] fixes the issue, and the
new trick still works with older libxml2 (tested 2.11.5).

As a side note, DOMDocument::loadHTML uses HTMLParser in libxml2 [2][3].

[1] https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly
[2] https://github.com/php/php-src/blob/php-8.1.26/ext/dom/document.c#L1855
[3] https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-HTMLparser.html
2023-11-26 21:04:56 +08:00
..
API.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Article.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Auth_Base.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Cache_Adapter.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Cache_Local.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Config.php replace some dirname horrors with a separate unit-tested method 2023-10-27 22:07:28 +03:00
Counters.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Db.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Db_Migrations.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Db_Prefs.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Debug.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Digest.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
DiskCache.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Errors.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedEnclosure.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedItem.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedItem_Atom.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedItem_Common.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedItem_RSS.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
FeedParser.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Feeds.php Fix class names in some more places. 2023-10-26 15:01:43 +00:00
Handler.php add stuff necessary to run integration tests using phpunit 2023-10-28 18:45:09 +03:00
Handler_Administrative.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Handler_Protected.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Handler_Public.php make phpstan happy 2023-10-25 18:04:42 +03:00
IAuthModule.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
IAuthModule2.php add a separate interface for auth modules w/ change_password() method 2023-10-27 22:29:03 +03:00
ICatchall.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
IHandler.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
IVirtualFeed.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Labels.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Logger.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Logger_Adapter.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Logger_SQL.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Logger_Stdout.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Logger_Syslog.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Mailer.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
OPML.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Plugin.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
PluginHandler.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
PluginHost.php Merge branch 'master' of gitlab.tt-rss.org:tt-rss/tt-rss 2023-10-27 22:07:41 +03:00
Pref_Feeds.php add wip UI/backend stuff to filter feed tree 2023-11-03 08:33:35 +03:00
Pref_Filters.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Pref_Labels.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Pref_Prefs.php add a separate interface for auth modules w/ change_password() method 2023-10-27 22:29:03 +03:00
Pref_System.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Pref_Users.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Prefs.php add stuff necessary to run integration tests using phpunit 2023-10-28 18:45:09 +03:00
RPC.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
RSSUtils.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Sanitizer.php Fix sanitizer with libxml2 >= 2.12.0 2023-11-26 21:04:56 +08:00
Templator.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
TimeHelper.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
Tracer.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
UrlHelper.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00
UserHelper.php move to psr-4 autoloader 2023-10-25 12:55:09 +03:00