diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-31 16:45:58 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-31 16:45:58 +0100 |
commit | 49ea05b8ff27c31924ddf94c582ab4260faf56c2 (patch) | |
tree | 36aa6facfe6687743a5f38ae9ff97adc6f649390 /include/items.php | |
parent | 6ea87223d3ba5d9ecc1fa57453207e1645819fe5 (diff) | |
download | volse-hubzilla-49ea05b8ff27c31924ddf94c582ab4260faf56c2.tar.gz volse-hubzilla-49ea05b8ff27c31924ddf94c582ab4260faf56c2.tar.bz2 volse-hubzilla-49ea05b8ff27c31924ddf94c582ab4260faf56c2.zip |
use microformat to mark html from [embed] tag, convert html with oembed microformat to [embed] tag
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index a5991d663..f204745bb 100644 --- a/include/items.php +++ b/include/items.php @@ -1,6 +1,7 @@ <?php require_once('bbcode.php'); +require_once('oembed.php'); function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { @@ -395,6 +396,8 @@ function get_atom_elements($feed,$item) { $res['body'] = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s', '[youtube]$1[/youtube]', $res['body']); + $res['body'] = oembed_html2bbcode($res['body']); + $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.DefinitionImpl', null); |