diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 20:52:28 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 20:52:28 +0000 |
commit | 0a010cc5adcfb76816cb636208e178e89915179a (patch) | |
tree | d4865d9f99ce803f960f907d41e1664e56939278 /webkit/appcache | |
parent | 4f0012c1ea5181d8aa6aec67f0648e77aa068fc7 (diff) | |
download | chromium_src-0a010cc5adcfb76816cb636208e178e89915179a.zip chromium_src-0a010cc5adcfb76816cb636208e178e89915179a.tar.gz chromium_src-0a010cc5adcfb76816cb636208e178e89915179a.tar.bz2 |
Base64 encode form param values in about:appcache-internals
BUG=74891
TEST=manual
Review URL: http://codereview.chromium.org/6696039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r-- | webkit/appcache/view_appcache_internals_job.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc index c165375..4a07d34 100644 --- a/webkit/appcache/view_appcache_internals_job.cc +++ b/webkit/appcache/view_appcache_internals_job.cc @@ -6,6 +6,7 @@ #include "webkit/appcache/view_appcache_internals_job.h" +#include "base/base64.h" #include "base/logging.h" #include "base/format_macros.h" #include "base/utf_string_conversions.h" @@ -84,9 +85,9 @@ void AddLiTag(const std::string& element_title, } void WrapInHREF(const std::string& in, std::string* out) { - out->append("<a href='"); + out->append("<a href="); out->append(in); - out->append("'>"); + out->append(">"); out->append(in); out->append("</a><br/>"); } @@ -97,6 +98,9 @@ void AddHTMLFromAppCacheToOutput( for (std::vector<appcache::AppCacheInfo>::const_iterator info = appcaches.begin(); info != appcaches.end(); ++info) { + std::string manifest_url_base64; + base::Base64Encode(info->manifest_url.spec(), &manifest_url_base64); + out->append("<p>"); std::string anchored_manifest; WrapInHREF(info->manifest_url.spec(), &anchored_manifest); @@ -107,7 +111,7 @@ void AddHTMLFromAppCacheToOutput( out->append(kFormattedDisabledAppCacheMsg); } out->append("<br/>"); - DrawCommandButton(kRemoveAppCache, info->manifest_url.spec(), out); + DrawCommandButton(kRemoveAppCache, manifest_url_base64, out); out->append("<ul>"); AddLiTag(kSize, @@ -133,9 +137,12 @@ std::string GetAppCacheManifestToRemove(const std::string& query) { // Not a recognized format. return std::string(); } - std::string manifest_str = query.substr(strlen("remove=")); - return UnescapeURLComponent( - manifest_str, UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS); + std::string manifest_url_base64 = UnescapeURLComponent( + query.substr(strlen("remove=")), + UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS); + std::string manifest_url; + base::Base64Decode(manifest_url_base64, &manifest_url); + return manifest_url; } struct ManifestURLComparator { |