aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-10-08 20:58:16 -0700
committerzotlabs <mike@macgirvin.com>2018-10-08 20:58:16 -0700
commit2cb52f88755aac62f208463e4754153bbf249c67 (patch)
tree01746da751c10a67f6064d2d1fd79af33dc73685 /include/text.php
parent2c797807cd63850055fc65e445a605aee106530a (diff)
parent37b94bf5fa71835fe50af6f862e124e24b5db4b4 (diff)
downloadvolse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.tar.gz
volse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.tar.bz2
volse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.zip
Merge branch 'dev'
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index f03d0b860..1d884593f 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2965,7 +2965,9 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
}
- if(string_replace($old,$new,$item['body'])) {
+ $x = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
+ if($x) {
+ $item['body'] = $x;
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));
$item['item_verified'] = 1;
}