boost::regex aboutRegex(R"(^about:[^\s]*$)");
boost::regex fileRegex(R"(^file:///[^\s]*$)");
boost::regex myfilesappRegex(R"(^file:///opt/usr/media/[^\s]*$)");
- boost::regex myfilesappetcRegex(R"(^file:///opt/usr/media/../[^\s]*$)");
if (!url.empty()) {
if (boost::regex_match(url, urlRegex) ||
boost::regex_match(url, aboutRegex) ||
boost::regex_match(url, chromeRegex) ||
(boost::regex_match(url, myfilesappRegex) &&
- !boost::regex_match(url, myfilesappetcRegex))) {
+ (url.find("../") == std::string::npos))) {
return url;
} else if (boost::regex_match(std::string("http://") + url, urlRegex) &&
(!boost::regex_match(url, fileRegex)) &&