Bug 270297 "Search web for..." mangles selections containing newlines (regression from bug 221361) p=elmar.ludwig@uos.de r+sr=me

This commit is contained in:
neil%parkwaycc.co.uk 2005-10-21 23:01:24 +00:00
parent 19f519f8da
commit e693b211c3
2 changed files with 4 additions and 2 deletions

View File

@ -4801,7 +4801,8 @@ nsContextMenu.prototype = {
pattern.test(searchStr);
searchStr = RegExp.lastMatch;
}
searchStr = searchStr.replace(/\s*(.*?)\s*$/, "$1");
searchStr = searchStr.replace(/^\s+/, "");
searchStr = searchStr.replace(/\s+$/, "");
searchStr = searchStr.replace(/\s+/g, " ");
return searchStr;
},

View File

@ -809,7 +809,8 @@ nsContextMenu.prototype = {
pattern.test(searchStr);
searchStr = RegExp.lastMatch;
}
searchStr = searchStr.replace(/\s*(.*?)\s*$/, "$1");
searchStr = searchStr.replace(/^\s+/, "");
searchStr = searchStr.replace(/\s+$/, "");
searchStr = searchStr.replace(/\s+/g, " ");
return searchStr;
},