Don't let an empty intl.charset.default pref set the document charset to
the empty string. Fall back to ISO-8859-1 in the script loader if there is no other charset set. Bug 118404, r=harishd, sr=jst git-svn-id: svn://10.0.0.236/trunk@113444 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -679,11 +679,11 @@ nsHTMLDocument::TryWeakDocTypeDefault(PRInt32& aCharsetSource,
|
||||
if (prefs) {
|
||||
nsXPIDLString defCharset;
|
||||
nsresult rv = prefs->GetLocalizedUnicharPref("intl.charset.default", getter_Copies(defCharset));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (NS_SUCCEEDED(rv) && !defCharset.IsEmpty()) {
|
||||
aCharset.Assign(defCharset);
|
||||
aCharsetSource = kCharsetFromWeakDocTypeDefault;
|
||||
}
|
||||
}
|
||||
aCharsetSource = kCharsetFromWeakDocTypeDefault;
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user