зеркало из https://github.com/mozilla/pjs.git
Title chopping from bug 319004 might split a BMP character in the middle. r=smontagu, sr=darin. bug 322167
This commit is contained in:
Родитель
e065571cdf
Коммит
f34bd629b6
|
@ -1119,6 +1119,8 @@ nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
|
|||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
nsAutoString titleString(StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
|
||||
if (IS_HIGH_SURROGATE(titleString.Last()))
|
||||
titleString.Truncate(titleString.Length()-1);
|
||||
|
||||
// skip about: URIs to avoid reading in the db (about:blank, especially)
|
||||
PRBool isAbout;
|
||||
|
|
|
@ -1042,6 +1042,8 @@ nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
|
|||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
nsAutoString titleString(StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
|
||||
if (IS_HIGH_SURROGATE(titleString.Last()))
|
||||
titleString.Truncate(titleString.Length()-1);
|
||||
|
||||
// skip about: URIs to avoid reading in the db (about:blank, especially)
|
||||
PRBool isAbout;
|
||||
|
|
Загрузка…
Ссылка в новой задаче