$purifier = new HTMLPurifier($cfg);
$purified = $purifier->purify($html);
Event::handle('EndCommonPurify', [&$purified, $html]);
-
+
return $purified;
}
} else {
$canon = File_redirection::_canonUrl($url);
$longurl_data = File_redirection::where($canon, common_config('attachments', 'process_links'));
-
+
if (isset($longurl_data->redir_url)) {
$longurl = $longurl_data->redir_url;
} else {
$longurl = $longurl_data->url;
}
}
-
+
$attrs = ['href' => $longurl, 'title' => $longurl];
$is_attachment = false;
function common_log($priority, $msg, $filename=null)
{
+ // Don't write LOG_DEBUG if that's not wanted
+ if ($priority === LOG_DEBUG && !common_config('site', 'logdebug')) {
+ return;
+ }
+
if (Event::handle('StartLog', [&$priority, &$msg, &$filename])) {
$msg = (empty($filename)) ? $msg : basename($filename) . ' - ' . $msg;
$msg = '[' . common_request_id() . '] ' . $msg;