aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-10-06 15:59:27 -0700
committerredmatrix <mike@macgirvin.com>2016-10-06 15:59:27 -0700
commit48f70e55aa67339d4b5505b1e717ccc6d5651834 (patch)
treeff336b5dba32bfbdd0b4bce64cf4a228c19ce65e /Zotlabs/Module
parent3250d7532092608651649d27619f7b245d426d03 (diff)
downloadvolse-hubzilla-48f70e55aa67339d4b5505b1e717ccc6d5651834.tar.gz
volse-hubzilla-48f70e55aa67339d4b5505b1e717ccc6d5651834.tar.bz2
volse-hubzilla-48f70e55aa67339d4b5505b1e717ccc6d5651834.zip
try naked embed before submission instead of at render time
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Item.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 8d1182b31..11fa9d8bf 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -20,6 +20,8 @@ namespace Zotlabs\Module;
require_once('include/crypto.php');
require_once('include/items.php');
require_once('include/attach.php');
+require_once('include/bbcode.php');
+
use \Zotlabs\Lib as Zlib;
@@ -550,6 +552,8 @@ class Item extends \Zotlabs\Web\Controller {
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
+
+ $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'nakedoembed', $body);
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", '\red_zrl_callback', $body);
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);