summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/display.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/display.php b/inc/display.php
index ef952ca2..2b5d3116 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -350,8 +350,8 @@ class Thread {
// Fix internal links
// Very complicated regex
$this->body = preg_replace(
- '/<a(([a-zA-Z]+="[^"]+")|[a-zA-Z]+=[a-zA-Z]+|\s)*href="' . preg_quote($config['root'], '/') . '(' . sprintf(preg_quote($config['board_path'], '/'), '\w+') . ')/',
- '<a href="?/$3',
+ '/<a((([a-zA-Z]+="[^"]+")|[a-zA-Z]+=[a-zA-Z]+|\s)*)href="' . preg_quote($config['root'], '/') . '(' . sprintf(preg_quote($config['board_path'], '/'), '\w+') . ')/',
+ '<a $1href="?/$4',
$this->body
);
}