diff options
author | Friendika <info@friendika.com> | 2010-11-08 22:39:03 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-11-08 22:39:03 -0800 |
commit | 098478e3a59b9283dea2591807d99c24ea6f8837 (patch) | |
tree | d0a0ee671f322092f060ad5a6e9b076d8181a266 /include/bbcode.php | |
parent | 9f606be54093b934081eb32f6d1a66f4d9fa9268 (diff) | |
download | volse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.tar.gz volse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.tar.bz2 volse-hubzilla-098478e3a59b9283dea2591807d99c24ea6f8837.zip |
linkify hash tags
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index a315c3e38..961494b16 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -12,13 +12,13 @@ function bbcode($Text) { $Text = nl2br($Text); // Set up the parameters for a URL search string - $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'"; + $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%"; // Set up the parameters for a MAIL search string $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@"; // Perform URL Search - $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" target="_blank">$1</a>', $Text); - $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text); + $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text); + $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text); //$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text); // Perform MAIL Search |