aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-23 08:39:00 +0100
committerzottel <github@zottel.net>2012-03-23 08:39:00 +0100
commit5fadf68fb4e4a6e0fde6fbf82ad7600c8ca12c04 (patch)
tree31d591b4f19fa71aa972aa797b51880728dc3d76 /include/text.php
parente7d80a79fff23e6f8900b40677d11d1022a45df6 (diff)
parent7706a8f9d8d71b89c791f31f957496b95b8bb31f (diff)
downloadvolse-hubzilla-5fadf68fb4e4a6e0fde6fbf82ad7600c8ca12c04.tar.gz
volse-hubzilla-5fadf68fb4e4a6e0fde6fbf82ad7600c8ca12c04.tar.bz2
volse-hubzilla-5fadf68fb4e4a6e0fde6fbf82ad7600c8ca12c04.zip
Merge remote branch 'upstream/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;
+}
+