1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

handle post citations with trailing punctuation

This commit is contained in:
Savetheinternet 2011-08-18 20:16:02 +10:00
parent 65d2403209
commit cfc6428219

View File

@ -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']);
}