summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-04-11 06:10:50 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-04-11 06:10:50 +1000
commit4dcdca997eeb3aa91e9235d0a609bf2ecb071306 (patch)
treeb6b6b47de9ef6b65d664ef4a589f963578fa911c /inc/functions.php
parent4db78899e49ecf910a79cb709b5e5efc89c8c1da (diff)
simpler markup regular expressions
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 0a7a77d4..2ee50aca 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1451,6 +1451,7 @@
function markup(&$body, $track_cites = false) {
global $board, $config, $markup_urls;
+ $body = str_replace("\r", '', $body);
$body = utf8tohtml($body);
foreach($config['markup'] as $markup) {
@@ -1557,10 +1558,7 @@
}
}
-
- $body = str_replace("\r", '', $body);
-
- $body = preg_replace("/(^|\n)([\s]+)?(&gt;)([^\n]+)?($|\n)/m", '$1$2<span class="quote">$3$4</span>$5', $body);
+ $body = preg_replace("/^\s*&gt;.*$/m", '<span class="quote">$0</span>', $body);
if($config['strip_superfluous_returns'])
$body = preg_replace('/\s+$/', '', $body);