aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-16 19:57:13 -0700
committerFriendika <info@friendika.com>2011-03-16 19:57:13 -0700
commit8fd989c568f6452ce1a91914cef4a33c5d3b4d76 (patch)
treead50e99a4b9175e6b2781988743e3f7d8a42edc7 /mod/item.php
parent3f432a7b82480dd985dbc2a67ae23cfc1ed258c6 (diff)
downloadvolse-hubzilla-8fd989c568f6452ce1a91914cef4a33c5d3b4d76.tar.gz
volse-hubzilla-8fd989c568f6452ce1a91914cef4a33c5d3b4d76.tar.bz2
volse-hubzilla-8fd989c568f6452ce1a91914cef4a33c5d3b4d76.zip
protect tags from double expansion during RT
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 90fb546bc..6e6e822d0 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -212,6 +212,8 @@ function item_post(&$a) {
if(count($tags)) {
foreach($tags as $tag) {
if(strpos($tag,'#') === 0) {
+ if(strpos($tag,'[url='))
+ continue;
$basetag = str_replace('_',' ',substr($tag,1));
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
if(strlen($str_tags))
@@ -220,6 +222,8 @@ function item_post(&$a) {
continue;
}
if(strpos($tag,'@') === 0) {
+ if(strpos($tag,'[url='))
+ continue;
$stat = false;
$name = substr($tag,1);
if((strpos($name,'@')) || (strpos($name,'http://'))) {