aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-22 16:17:10 -0700
committerfriendica <info@friendica.com>2012-03-22 16:17:10 -0700
commit528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f (patch)
treeb3a778af971ba29592c412c640112123e78e41d6 /include/text.php
parent622b25df5f2d1ab21c9e23047bc0c98bfe72bad0 (diff)
downloadvolse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.tar.gz
volse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.tar.bz2
volse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.zip
ability to change tags in edited posts
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;
+}
+