aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-20 04:07:24 -0700
committerFriendika <info@friendika.com>2011-09-20 04:07:24 -0700
commit119cd9c0cee5e416199da900016609259598cb0b (patch)
treefc274a403099ddb9108e805fd1b7cc6ad36fd417 /include
parent9edf15d3ef0548a35862fab37eee1fd310705285 (diff)
downloadvolse-hubzilla-119cd9c0cee5e416199da900016609259598cb0b.tar.gz
volse-hubzilla-119cd9c0cee5e416199da900016609259598cb0b.tar.bz2
volse-hubzilla-119cd9c0cee5e416199da900016609259598cb0b.zip
more multiline regex fixes
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index cbe19de54..9abc7c439 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -43,11 +43,11 @@ function bbcode($Text,$preserve_nl = false) {
// Perform URL Search
- $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/", '$1<a href="$2" target="external-link">$2</a>', $Text);
+ $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="external-link">$2</a>', $Text);
- $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/m", '<a href="$1" target="external-link">$1</a>', $Text);
- $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/m", '<a href="$1" target="external-link">$2</a>', $Text);
- //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/m", '<a href="$1" target="_blank">$2</a>', $Text);
+ $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="external-link">$1</a>', $Text);
+ $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
+ //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
// Perform MAIL Search
@@ -95,7 +95,7 @@ function bbcode($Text,$preserve_nl = false) {
// $Text = str_replace("[*]", "<li>", $Text);
// Check for font change text
- $Text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/m","<span style=\"font-family: $1;\">$2</span>",$Text);
+ $Text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm","<span style=\"font-family: $1;\">$2</span>",$Text);
// Declare the format for [code] layout