Update Search function - #ref bugfix

The query needs to be encoded. For example: `#if winactive` needs to be `%23if%20winactive` or `%23if+winactive`, otherwise the search page will handle it as a ref `#`. `encodeURIComponent()` fixes this.
see **jsfiddle:** http://jsfiddle.net/joedf/x5khrsjm/