Browse Source

handle post citations with trailing punctuation

pull/40/head
Savetheinternet 13 years ago
parent
commit
cfc6428219
  1. 4
      inc/functions.php

4
inc/functions.php

@ -1215,7 +1215,7 @@
}
// Cites
if(isset($board) && preg_match_all('/(^|\s)>>(\d+?)(\s|$)/', $body, $cites)) {
if(isset($board) && preg_match_all('/(^|\s)>>(\d+?)([\s,.]|$)/', $body, $cites)) {
if(count($cites[0]) > $config['max_cites']) {
error($config['error']['toomanycites']);
}
@ -1237,7 +1237,7 @@
}
// Cross-board linking
if(preg_match_all('/(^|\s)>>>\/(\w+?)\/(\d+)?(\s|$)/', $body, $cites)) {
if(preg_match_all('/(^|\s)>>>\/(\w+?)\/(\d+)?([\s,.]|$)/', $body, $cites)) {
if(count($cites[0]) > $config['max_cites']) {
error($config['error']['toomanycross']);
}

Loading…
Cancel
Save