Remove the Asterisk mark and Question mark in decrypt resource path
authorJongHeon Choi <j-h.choi@samsung.com>
Mon, 9 May 2016 11:57:12 +0000 (20:57 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Mon, 9 May 2016 22:56:36 +0000 (07:56 +0900)
common/resource_manager.cc

index 349a38f..c00d965 100644 (file)
@@ -577,6 +577,11 @@ std::string ResourceManager::DecryptResource(const std::string& path) {
     src_path.erase(0, strlen(kSchemeTypeFile));
   }
 
+  // Remove the parameters at the end of an href attribute
+  size_t end_of_path = src_path.find_first_of("?#");
+  if (end_of_path != std::string::npos)
+    src_path = src_path.substr(0, end_of_path);
+
   FILE *src = fopen(src_path.c_str(), "rb");
   if (!src) {
     LOGGER(ERROR) << "Cannot open file for decryption: " << src_path;