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

Commit 013647f0 authored by Brion Vibber's avatar Brion Vibber Committed by Sarven Capadisli

Add doc comments on saveHTMLFile; drop the extra <div> wrapping the contents...

Add doc comments on saveHTMLFile; drop the extra <div> wrapping the contents to make it easier to extract without getting extra markup.
parent 511a164c
......@@ -1676,10 +1676,18 @@ class Ostatus_profile extends Memcached_DataObject
throw new Exception("Couldn't find a valid profile for '$addr'");
}
/**
* Store the full-length scrubbed HTML of a remote notice to an attachment
* file on our server. We'll link to this at the end of the cropped version.
*
* @param string $title plaintext for HTML page's title
* @param string $rendered HTML fragment for HTML page's body
* @return File
*/
function saveHTMLFile($title, $rendered)
{
$final = sprintf("<!DOCTYPE html>\n<html><head><title>%s</title></head>".
'<body><div>%s</div></body></html>',
'<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