From: garvinhicking Date: Sun, 29 Jan 2006 13:53:57 +0000 (+0000) Subject: Strip the real unneccessary components X-Git-Tag: 1.0~134 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8668d481846c3f63810859252881627aabf94cdc;p=s9y.git Strip the real unneccessary components --- diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php index e273f5f..b122843 100644 --- a/include/functions_permalinks.inc.php +++ b/include/functions_permalinks.inc.php @@ -688,7 +688,7 @@ function serendipity_currentURL() { $qst = '&' . str_replace('&', '&', $uri['query']); } $uri['path'] = preg_replace('@^' . preg_quote($serendipity['serendipityHTTPPath']) . '@i', '', $uri['path']); - $uri['path'] = preg_replace('@^' . preg_quote($serendipity['indexFile']) . '@i', '', $uri['path']); + $uri['path'] = preg_replace('@^(&)?' . preg_quote($serendipity['indexFile']) . '(&)@i', '', $uri['path']); $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst; $url = str_replace( array(