summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-29 16:27:50 -0700
committerBrion Vibber <brion@pobox.com>2010-03-29 16:27:50 -0700
commit990bbea07e28abb5074f99217b2ddde6b8e5aa22 (patch)
tree924ad953bc7e322973f4a689eb030c1e259d63dc
parentfaa14b64abb006422149562ba51e82820ed2aefa (diff)
Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8.
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 34bff548d..8ba2ce0c3 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -1685,7 +1685,11 @@ class Ostatus_profile extends Memcached_DataObject
*/
function saveHTMLFile($title, $rendered)
{
- $final = sprintf("<!DOCTYPE html>\n<html><head><title>%s</title></head>".
+ $final = sprintf("<!DOCTYPE html>\n" .
+ '<html><head>' .
+ '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' .
+ '<title>%s</title>' .
+ '</head>' .
'<body>%s</body></html>',
htmlspecialchars($title),
$rendered);