diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-29 16:27:50 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-29 16:29:57 -0700 |
commit | 6046a6cc6ae72edfde90719d6e1f9dc39e0fa7ab (patch) | |
tree | bf087e5615c6248c84e6ff3c7054ee634e6994b9 /plugins | |
parent | bf468e2a8db4d67a0f1a2c7fdfd0aa9306e006fc (diff) |
Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/OStatus/classes/Ostatus_profile.php | 6 |
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); |