aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-08 11:26:14 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-08 11:26:14 +0200
commit737f66001105e884e9870db4f5e52c60ba9a5198 (patch)
tree3bbd082e87dcb3befa138a6c7e1f82ad90051706 /include
parente0568f33e82de15e5d5a38ec7697d6afd67352f3 (diff)
parentfc3d0233af7d1d9d3432f172efe12c8d4be3eb31 (diff)
downloadvolse-hubzilla-737f66001105e884e9870db4f5e52c60ba9a5198.tar.gz
volse-hubzilla-737f66001105e884e9870db4f5e52c60ba9a5198.tar.bz2
volse-hubzilla-737f66001105e884e9870db4f5e52c60ba9a5198.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-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;
}