From: Andrew Dolgov Date: Sun, 9 Dec 2012 09:32:09 +0000 (+0400) Subject: do not use regexps in get_self_url_prefix() X-Git-Tag: 1.6.2~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=51cc387347668e98b1b8e6c6053581a2affc5fa6;p=tt-rss.git do not use regexps in get_self_url_prefix() --- diff --git a/include/functions.php b/include/functions.php index 95881dd9..53aaa92b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3405,9 +3405,12 @@ return $tag; } - // we need to placate idiots who don't know any better function get_self_url_prefix() { - return preg_replace("/\/$/", "", SELF_URL_PATH); + if (strrpos(SELF_URL_PATH, "/") === strlen(SELF_URL_PATH)-1) { + return substr(SELF_URL_PATH, 0, strlen(SELF_URL_PATH)-1); + } else { + return SELF_URL_PATH; + } } function opml_publish_url($link){