From f6e9dbed1333f6761de0e748a6a41b6b365158dc Mon Sep 17 00:00:00 2001 From: Marcin Ɓabanowski Date: Wed, 9 Jan 2013 08:33:40 +0100 Subject: Facilitate creation and usage of boards with "." and "+" characters in name. This commit is mostly work in progress, will be rewritten. --- inc/functions.php | 2 +- inc/mod/pages.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/functions.php b/inc/functions.php index a7b6b434..190b98ae 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1436,7 +1436,7 @@ function markup(&$body, $track_cites = false) { } // Cross-board linking - if (preg_match_all('/(^|\s)>>>\/(\w+?)\/(\d+)?([\s,.)?]|$)/m', $body, $cites)) { + if (preg_match_all('/(^|\s)>>>\/([\w.+]+?)\/(\d+)?([\s,.)?]|$)/m', $body, $cites)) { if (count($cites[0]) > $config['max_cites']) { error($config['error']['toomanycross']); } diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 4f1ab73c..8666f04c 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -236,8 +236,8 @@ function mod_new_board() { if ($_POST['title'] == '') error(sprintf($config['error']['required'], 'title')); - if (!preg_match('/^\w+$/', $_POST['uri'])) - error(sprintf($config['error']['invalidfield'], 'URI')); + #if (!preg_match('/^\w+$/', $_POST['uri'])) + # error(sprintf($config['error']['invalidfield'], 'URI')); if (openBoard($_POST['uri'])) { error(sprintf($config['error']['boardexists'], $board['url'])); -- cgit v1.3