aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-03-23 10:45:10 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-03-23 10:45:10 +0100
commit6f79cde0241a6b13fd79756a8e19394d576174a9 (patch)
tree95bb8a727235a8e22ed81440359fe71c4e09f6c4 /include/text.php
parentd5a6e7b1767ebc337f31745984f1ce0904b77780 (diff)
parentc35b9ec24f1449a691afeeb985a41fbaf07b2af1 (diff)
downloadvolse-hubzilla-6f79cde0241a6b13fd79756a8e19394d576174a9.tar.gz
volse-hubzilla-6f79cde0241a6b13fd79756a8e19394d576174a9.tar.bz2
volse-hubzilla-6f79cde0241a6b13fd79756a8e19394d576174a9.zip
Merge remote-tracking branch 'friendica/master'
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 92a74eb49..6f66cef65 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1338,3 +1338,16 @@ function file_tag_unsave_file($uid,$item,$file) {
function normalise_openid($s) {
return trim(str_replace(array('http://','https://'),array('',''),$s),'/');
}
+
+
+function undo_post_tagging($s) {
+ $matches = null;
+ $cnt = preg_match_all('/([@#])\[url=(.*?)\](.*?)\[\/url\]/ism',$s,$matches,PREG_SET_ORDER);
+ if($cnt) {
+ foreach($matches as $mtch) {
+ $s = str_replace($mtch[0], $mtch[1] . $mtch[3],$s);
+ }
+ }
+ return $s;
+}
+