Bug 339002 Last %-escaped character in URL disappears in status bar if page displayed as UTF-8. r=jshin, sr=roc
git-svn-id: svn://10.0.0.236/trunk@198528 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
63a696ec25
commit
cd068d3ffe
@ -233,8 +233,11 @@ NS_IMETHODIMP nsTextToSubURI::UnEscapeURIForUI(const nsACString & aCharset,
|
||||
esc_SkipControl | esc_AlwaysCopy, unescapedSpec);
|
||||
|
||||
// in case of failure, return escaped URI
|
||||
if (NS_FAILED(convertURItoUnicode(
|
||||
PromiseFlatCString(aCharset), unescapedSpec, PR_TRUE, _retval)))
|
||||
// Test for != NS_OK rather than NS_FAILED, because incomplete multi-byte
|
||||
// sequences are also considered failure in this context
|
||||
if (convertURItoUnicode(
|
||||
PromiseFlatCString(aCharset), unescapedSpec, PR_TRUE, _retval)
|
||||
!= NS_OK)
|
||||
// assume UTF-8 instead of ASCII because hostname (IDN) may be in UTF-8
|
||||
CopyUTF8toUTF16(aURIFragment, _retval);
|
||||
return NS_OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user