forked from GNUsocial/gnu-social
Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8.
This commit is contained in:
parent
faa14b64ab
commit
990bbea07e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user