diff --git a/inc/config.php b/inc/config.php
index 3e65ef56..d57d3263 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -333,10 +333,10 @@
*/
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
- $config['markup'][] = Array("/'''(.+?)'''/m", "\$1");
- $config['markup'][] = Array("/''(.+?)''/m", "\$1");
- $config['markup'][] = Array("/\*\*(.+?)\*\*/m", "\$1");
- $config['markup'][] = Array("/(^|\n)==(.+?)==\n?/m", "\$2");
+ $config['markup'][] = Array("/'''(.+?)'''/", "\$1");
+ $config['markup'][] = Array("/''(.+?)''/", "\$1");
+ $config['markup'][] = Array("/\*\*(.+?)\*\*/", "\$1");
+ $config['markup'][] = Array("/^\s*==(.+?)==\s*$/m", "\$1");
// Highlight PHP code wrapped in tags (PHP 5.3.0+)
// $config['markup'][] = Array(
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]+)?(>)([^\n]+)?($|\n)/m", '$1$2$3$4$5', $body);
+ $body = preg_replace("/^\s*>.*$/m", '$0', $body);
if($config['strip_superfluous_returns'])
$body = preg_replace('/\s+$/', '', $body);