From 39378dcb9c851925d9f8f2696057cabcbe994f50 Mon Sep 17 00:00:00 2001 From: Andreas Krennmair Date: Fri, 19 Jun 2009 22:16:21 +0200 Subject: fixed overeager censorship of "special" URLs that leads to messed-up URLs in the feed list. --- src/utils.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/utils.cpp') diff --git a/src/utils.cpp b/src/utils.cpp index 5e461608..c72a3fbd 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -619,9 +619,13 @@ std::string utils::join(const std::vector& strings, const std::stri return result; } +bool utils::is_special_url(const std::string& url) { + return url.substr(0,6) == "query:" || url.substr(0,7) == "filter:" || url.substr(0,5) == "exec:"; +} + std::string utils::censor_url(const std::string& url) { std::string rv; - if (url.length() > 0) { + if (url.length() > 0 && !utils::is_special_url(url)) { const char * myuri = url.c_str(); xmlURIPtr uri = xmlParseURI(myuri); if (uri) { @@ -636,6 +640,8 @@ std::string utils::censor_url(const std::string& url) { xmlFreeURI(uri); } else return url; + } else { + rv = url; } return rv; } -- cgit v1.2.3