diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2012-03-23 10:45:10 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2012-03-23 10:45:10 +0100 |
commit | 6f79cde0241a6b13fd79756a8e19394d576174a9 (patch) | |
tree | 95bb8a727235a8e22ed81440359fe71c4e09f6c4 /include/text.php | |
parent | d5a6e7b1767ebc337f31745984f1ce0904b77780 (diff) | |
parent | c35b9ec24f1449a691afeeb985a41fbaf07b2af1 (diff) | |
download | volse-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.php | 13 |
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; +} + |