Skip to content
Snippets Groups Projects
Commit 09aac802 authored by jshin@chromium.org's avatar jshin@chromium.org
Browse files

Add 'meta charset=UTF-8' to the html of an iframe interstitial to prevent...

Add 'meta charset=UTF-8' to the html of an iframe interstitial  to prevent non-ASCII characters from being garbled. 

BUG=26030
TEST=1. Launch Chrome with --lang=pt-BR (ja or most languages other than English should work) on Windows or 'LANGUAGE=pt_BR chrome' on Linux.
2. Go to http://www.notalegal.df.gov.br/area=1248.htm and the iframe interstitial doesn't have a garbled character.
Review URL: http://codereview.chromium.org/348060

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30988 0039d316-1c4b-4281-b951-d872f2087c98
parent 7d5b7657
No related branches found
No related tags found
No related merge requests found
......@@ -92,11 +92,11 @@ SecurityFilterPeer* SecurityFilterPeer::CreateSecurityFilterPeerForFrame(
webkit_glue::ResourceLoaderBridge::Peer* peer, int os_error) {
// TODO(jcampan): use a different message when getting a phishing/malware
// error.
std::wstring error_msg = l10n_util::GetString(IDS_UNSAFE_FRAME_MESSAGE);
std::string html = StringPrintf(
"<html><body style='background-color:#990000;color:white;'>"
"<html><meta charset='UTF-8'>"
"<body style='background-color:#990000;color:white;'>"
"%s</body></html>",
WideToUTF8(error_msg).c_str());
l10n_util::GetStringUTF8(IDS_UNSAFE_FRAME_MESSAGE).c_str());
return new ReplaceContentPeer(NULL, peer, "text/html", html);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment