From 1acc7d66c63e0b9f794791e3a2e2b0f60bc2ebb1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 30 Sep 2010 11:29:31 -0700 Subject: Always specify UTF-8 targt charset for html_entity_decode(); default is 8-bit ISO-8859-1 which causes things to break when we later pass them through things that expect to work with UTF-8. For instance, running through preg_replace() with the /u option results in NULL, leading to problems with OStatus and SubMirror generating their plaintext versions and doing length-cropping. --- plugins/TwitterBridge/daemons/twitterstatusfetcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/TwitterBridge') diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 590fa2954..cef67b180 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -321,7 +321,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon $notice->is_local = Notice::GATEWAY; - $notice->content = html_entity_decode($status->text); + $notice->content = html_entity_decode($status->text, ENT_QUOTES, 'UTF-8'); $notice->rendered = $this->linkify($status); if (Event::handle('StartNoticeSave', array(&$notice))) { -- cgit v1.2.3-54-g00ecf