diff --git a/inc/functions.php b/inc/functions.php
index 52a7ec20..ba06eb73 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -2118,19 +2118,22 @@ function markup(&$body, $track_cites = false) {
'>>>/' . $_board . '/' . $cite .
'';
- $body = mb_substr_replace($body, $matches[1][0] . $replacement . $matches[4][0], $matches[0][1] + $skip_chars, mb_strlen($matches[0][0]));
- $skip_chars += mb_strlen($matches[1][0] . $replacement . $matches[4][0]) - mb_strlen($matches[0][0]);
-
- if ($track_cites && $config['track_cites'])
+ if ($track_cites && $config['track_cites']) {
$tracked_cites[] = array($_board, $cite);
+ }
+ } else {
+ $replacement = ">>>/$_board/$cite";
}
} elseif(isset($crossboard_indexes[$_board])) {
$replacement = '' .
'>>>/' . $_board . '/' .
'';
- $body = mb_substr_replace($body, $matches[1][0] . $replacement . $matches[4][0], $matches[0][1] + $skip_chars, mb_strlen($matches[0][0]));
- $skip_chars += mb_strlen($matches[1][0] . $replacement . $matches[4][0]) - mb_strlen($matches[0][0]);
+ } else {
+ $replacement = ">>>/$_board/$cite";
}
+
+ $body = mb_substr_replace($body, $matches[1][0] . $replacement . $matches[4][0], $matches[0][1] + $skip_chars, mb_strlen($matches[0][0]));
+ $skip_chars += mb_strlen($matches[1][0] . $replacement . $matches[4][0]) - mb_strlen($matches[0][0]);
}
}