From fd407b871d313df0fd73fa7750ba6ed3a384a165 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 18 Aug 2011 20:16:02 +1000 Subject: [PATCH] handle post citations with trailing punctuation --- inc/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 229c09b2..951a69a8 100644 --- a/inc/functions.php +++ b/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']); }