aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-01 22:30:54 -0800
committerfriendica <info@friendica.com>2015-01-01 22:30:54 -0800
commit68c612c597471404201099ecbc8b4082d152e18a (patch)
treea525bd6cb7f011322347ce2233fce42b17db46c5 /mod
parenta0052f0176bd079e6a94baec59fea2ec5a8d651e (diff)
downloadvolse-hubzilla-68c612c597471404201099ecbc8b4082d152e18a.tar.gz
volse-hubzilla-68c612c597471404201099ecbc8b4082d152e18a.tar.bz2
volse-hubzilla-68c612c597471404201099ecbc8b4082d152e18a.zip
fix shares that are processed with markdown (regression, this was pulled from diaspora2bb a couple weeks back as it was affecting diaspora input, but here we're dealing with red input only)
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index f5a9a4b22..894e23a0f 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -470,11 +470,13 @@ function item_post(&$a) {
require_once('include/text.php');
if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) {
- require_once('include/bb2diaspora.php');
- $body = diaspora2bb(escape_tags($body),true);
+ require_once('include/bb2diaspora.php');
+ $body = escape_tags($body);
+ $body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body);
+ $body = diaspora2bb($body,true);
+ $body = preg_replace_callback('/\[share(.*?)\]/ism','share_unshield',$body);
}
-
// BBCODE alert: the following functions assume bbcode input
// and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.)
// we may need virtual or template classes to implement the possible alternatives