summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-17 05:08:21 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-17 05:08:21 +0000
commitd34ddb55e7e69444406bfbb2c18b93c11652956a (patch)
tree151b0be037b2e6b7f5fdee5c6823e7627a99e7cd /chrome/browser/net
parentdb0e3d4cc12485bc35511992f15f11092a09ce2e (diff)
downloadchromium_src-d34ddb55e7e69444406bfbb2c18b93c11652956a.zip
chromium_src-d34ddb55e7e69444406bfbb2c18b93c11652956a.tar.gz
chromium_src-d34ddb55e7e69444406bfbb2c18b93c11652956a.tar.bz2
Add ':' to the RemoveJs whitelist for about:dns. This fixes the problem
of IPv6 literals appearing like "2001?4860?b005??84". Patch by pmarks@google.com. R=abarth TEST=View about:dns on an IPv6 network and notice that the address render correctly. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/dns_host_info.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/net/dns_host_info.cc b/chrome/browser/net/dns_host_info.cc
index 1b509d1..d40acd7 100644
--- a/chrome/browser/net/dns_host_info.cc
+++ b/chrome/browser/net/dns_host_info.cc
@@ -234,13 +234,13 @@ void DnsHostInfo::DLogResultsStats(const char* message) const {
//------------------------------------------------------------------------------
// Preclude any possibility of Java Script or markup in the text, by only
-// allowing alphanumerics, ".", and whitespace.
+// allowing alphanumerics, '.', '-', ':', and whitespace.
static std::string RemoveJs(const std::string& text) {
std::string output(text);
size_t length = output.length();
for (size_t i = 0; i < length; i++) {
char next = output[i];
- if (isalnum(next) || isspace(next) || '.' == next || '-' == next)
+ if (isalnum(next) || isspace(next) || strchr(".-:", next) != NULL)
continue;
output[i] = '?';
}