diff options
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/functions.php b/inc/functions.php index d5692be5..6db21c54 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -98,18 +98,18 @@ function loadConfig() { 'https?:\/\/' . $_SERVER['HTTP_HOST']) . preg_quote($config['root'], '/') . '(' . - str_replace('%s', '\w+', preg_quote($config['board_path'], '/')) . + str_replace('%s', $config['board_regex'], preg_quote($config['board_path'], '/')) . '(' . preg_quote($config['file_index'], '/') . '|' . str_replace('%d', '\d+', preg_quote($config['file_page'])) . ')?' . '|' . - str_replace('%s', '\w+', preg_quote($config['board_path'], '/')) . + str_replace('%s', $config['board_regex'], preg_quote($config['board_path'], '/')) . preg_quote($config['dir']['res'], '/') . str_replace('%d', '\d+', preg_quote($config['file_page'], '/')) . '|' . preg_quote($config['file_mod'], '/') . '\?\/.+' . - ')([#?](.+)?)?$/i'; + ')([#?](.+)?)?$/ui'; } else { // CLI mode $config['referer_match'] = '//'; @@ -1468,7 +1468,7 @@ function markup(&$body, $track_cites = false) { } // Cross-board linking - if (preg_match_all('/(^|\s)>>>\/(\w+?)\/(\d+)?([\s,.)?]|$)/m', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { + if (preg_match_all('/(^|\s)>>>\/(' . $config['board_regex'] . 'f?)\/(\d+)?([\s,.)?]|$)/um', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { if (count($cites[0]) > $config['max_cites']) { error($config['error']['toomanycross']); } |
