Support » Plugin: Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] Search term highlight in code

  • Great plugin, thanks.
    One small issue – I have a dropdown select box on some items being searched, and when I select highlighting things break. For example this:

    ‘<select title=”Click on a document from list below – will open in new tab or window” onchange=”if((this.options[this.selectedIndex].value)!=”Highline 300i specification documents:”)window.open(this.options[this.selectedIndex].value);return false”>

    </select>’

    if I search for ‘highline’ with highlighting on becomes:

    ‘<select title=”Click on a document from list below – will open in new tab or window” onchange=”if((this.options[this.selectedIndex].value)!=”<span style=” background-color:=”” #ffff00’=””>Highline 300i specification documents:”)window.open(this.options[this.selectedIndex].value);return false’ >

    </select>’
    which of course breaks the <select>

    Anything I can do to stop this highlighting?

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    The highlighting is done with a regexp that should not highlight anything inside a HTML tag. When I test the regexp at RegexPal with your HTML, it doesn’t highlight inside the select tag.

    So, either you’re using an older version of Relevanssi without this better regexp for highlighting or there’s something odd on your system breaking the way the regexp should work.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Search term highlight in code’ is closed to new replies.