aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-26 20:27:14 -0700
committerzotlabs <mike@macgirvin.com>2018-04-26 20:27:14 -0700
commit7b445a5b39b887135854ba1b9aa6d9867d584ae5 (patch)
tree69b14c3ca2d9e23552873e2495e6f8d50392ec06 /include/bbcode.php
parentce13fef6aaf4a99fdecd9ff5374028e5ff117651 (diff)
downloadvolse-hubzilla-7b445a5b39b887135854ba1b9aa6d9867d584ae5.tar.gz
volse-hubzilla-7b445a5b39b887135854ba1b9aa6d9867d584ae5.tar.bz2
volse-hubzilla-7b445a5b39b887135854ba1b9aa6d9867d584ae5.zip
where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 340fe6b25..345b5b025 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -85,12 +85,14 @@ function tryoembed($match) {
function nakedoembed($match) {
$url = ((count($match) == 2) ? $match[1] : $match[2]);
- $o = oembed_fetch_url($url);
+ $strip_url = strip_escaped_zids($url);
+
+ $o = oembed_fetch_url($strip_url);
if ($o['type'] == 'error')
- return $match[0];
+ return str_replace($url,$strip_url,$match[0]);
- return '[embed]' . $url . '[/embed]';
+ return '[embed]' . $strip_url . '[/embed]';
}
function tryzrlaudio($match) {