More IE7 Side Search Pain (pane)

Here is a context menu script that is supposed to open a site search results for the selected text from a web page in the IE7 Side Search Pane

Code Snippet

<html>
<script language="JavaScript" defer>
// Live Site Search Side Bar
var win = external.menuArguments;
var doc = win.document;
var sdomain = doc.domain;
var sel = doc.selection;
var rng = sel.createRange();
var html = new String(rng.htmlText);
if(html == '')
{
if(win.event.srcElement.tagName == "A")
html = win.event.srcElement.innerText;
}
var str = html.replace(/<[^>]*>/g," ");
str = str.replace(/\s+/g, " ");
str = str.replace(/^\s*/,"");
str = str.replace(/\s*$/,"");
if (str.indexOf(" ") != -1)
str = '"' + str + '"';
var url = 'http://search.msn.com/spresults.aspx?q=' + str + '+site:' + sdomain + '&FORM=QBPH';

win.open(url,'_search');
</script>
</html>

With "Enable web sites to use the Search Pane" option enabled, (and even with the Popup blocker disabled), the Side Search Pane is displayed but it fails to load the search page (http://search.msn.com/spresults.aspx). The user is left with a blank Side Search Pane.

Loading the Search Page from a web site and entering a site search query works as expected, displaying the site search results at the bottom of the Side Search Pane.

The above script works as expected in IE6.

[1806 byte] By [IECUSTOMIZER] at [2008-1-10]