We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 6046a6cc authored by Brion Vibber's avatar Brion Vibber

Include meta charset header in saved HTML file for long OStatus messages;...

Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8.
parent bf468e2a
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment