just a test, please do not try to implement this as there are severe security issues

This commit is contained in:
friendica
2015-04-30 17:52:34 -07:00
parent bc44b6f793
commit 097002910e
3 changed files with 21 additions and 3 deletions

View File

@@ -1371,8 +1371,12 @@ function generate_named_map($location) {
function prepare_body(&$item,$attach = false) {
if(get_config('system','item_cache') && $item['body'])
return $item['html'];
call_hooks('prepare_body_init', $item);
unobscure($item);
$s = prepare_text($item['body'],$item['mimetype']);
@@ -1440,6 +1444,12 @@ function prepare_body(&$item,$attach = false) {
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body_final', $prep_arr);
if(get_config('system','item_cache'))
q("update item set html = '%s' where id = %d",
dbesc($prep_arr['html']),
intval($item['id'])
);
return $prep_arr['html'];
}