Bug. Highlighted Search result modifies JavaScript code
SCENARIO:
You have "Highlight Located Text" set in View / Search Settings / Results.
You go to a product page via one of the results returned by the Search list.
That page contains JavaScript that has a word matching the search string then the JavaScript gets modified and broken.
DEMONSTRATION:
In a product template have:-
<script language="JavaScript">
<!--
var test= "Green";
// -->
</script>
And you have a product containing "Green" in it's description.
Now search for Green and follow the link to the product.
Kaboom! JavaScript error as the search results script changes the code to be:-
<script language="JavaScript">
<!--
var test= "<SPAN CLASS="actsearchhighlightcolor">,Green</SPAN>";
// -->
</script>
This also breaks the Actinic JavaScript in Act_primary. Just try searching for "option" or "section" and if you have that word in any of your products then Ka-nuclear-boom as the dropdown sections list code gets nuked when you follow the link.
SOLUTION:
A temporary one I hope as I'm sure you guys will fix this is to turn off "Highlight Located Text" set in Search Results options.
Norman.
p.s. that's a bug a day since the start of the week. Is this a record?
SCENARIO:
You have "Highlight Located Text" set in View / Search Settings / Results.
You go to a product page via one of the results returned by the Search list.
That page contains JavaScript that has a word matching the search string then the JavaScript gets modified and broken.
DEMONSTRATION:
In a product template have:-
<script language="JavaScript">
<!--
var test= "Green";
// -->
</script>
And you have a product containing "Green" in it's description.
Now search for Green and follow the link to the product.
Kaboom! JavaScript error as the search results script changes the code to be:-
<script language="JavaScript">
<!--
var test= "<SPAN CLASS="actsearchhighlightcolor">,Green</SPAN>";
// -->
</script>
This also breaks the Actinic JavaScript in Act_primary. Just try searching for "option" or "section" and if you have that word in any of your products then Ka-nuclear-boom as the dropdown sections list code gets nuked when you follow the link.
SOLUTION:
A temporary one I hope as I'm sure you guys will fix this is to turn off "Highlight Located Text" set in Search Results options.
Norman.
p.s. that's a bug a day since the start of the week. Is this a record?
Comment