mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 11:38:16 +00:00
Changed flag for entity conversion, bug 27376, r=akkana.
This commit is contained in:
parent
6d5a810174
commit
a9a9a9109a
@ -232,8 +232,11 @@ nsHTMLContentSinkStream::InitEncoder()
|
||||
return res;
|
||||
// SaveAsCharset requires a const char* in its first argument:
|
||||
nsCAutoString charsetCString (charsetName);
|
||||
// For ISO-8859-1 only, convert to entity first (always generate entites like ).
|
||||
res = mUnicodeEncoder->Init(charsetCString,
|
||||
nsISaveAsCharset::attr_htmlTextDefault,
|
||||
charsetName.EqualsIgnoreCase("ISO-8859-1") ?
|
||||
nsISaveAsCharset::attr_htmlTextDefault :
|
||||
nsISaveAsCharset::attr_EntityAfterCharsetConv + nsISaveAsCharset::attr_FallbackDecimalNCR,
|
||||
nsIEntityConverter::html40);
|
||||
return res;
|
||||
}
|
||||
|
@ -431,8 +431,11 @@ nsresult nsMsgI18NSaveAsCharset(const char* contentType, const char *charset, co
|
||||
// plain text - charset conv then fallback to '?'
|
||||
char charset_buf[kMAX_CSNAME+1];
|
||||
if (bTEXT_HTML) {
|
||||
// For ISO-8859-1 only, convert to entity first (always generate entites like ).
|
||||
res = aConv->Init(aCharset.ToCString(charset_buf, kMAX_CSNAME+1),
|
||||
nsISaveAsCharset::attr_htmlTextDefault,
|
||||
aCharset.EqualsIgnoreCase("ISO-8859-1") ?
|
||||
nsISaveAsCharset::attr_htmlTextDefault :
|
||||
nsISaveAsCharset::attr_EntityAfterCharsetConv + nsISaveAsCharset::attr_FallbackDecimalNCR,
|
||||
nsIEntityConverter::html40);
|
||||
}
|
||||
else {
|
||||
|
@ -232,8 +232,11 @@ nsHTMLContentSinkStream::InitEncoder()
|
||||
return res;
|
||||
// SaveAsCharset requires a const char* in its first argument:
|
||||
nsCAutoString charsetCString (charsetName);
|
||||
// For ISO-8859-1 only, convert to entity first (always generate entites like ).
|
||||
res = mUnicodeEncoder->Init(charsetCString,
|
||||
nsISaveAsCharset::attr_htmlTextDefault,
|
||||
charsetName.EqualsIgnoreCase("ISO-8859-1") ?
|
||||
nsISaveAsCharset::attr_htmlTextDefault :
|
||||
nsISaveAsCharset::attr_EntityAfterCharsetConv + nsISaveAsCharset::attr_FallbackDecimalNCR,
|
||||
nsIEntityConverter::html40);
|
||||
return res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user