getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

Should simplesearch be compatible with IE11/older versions of Edge? #159

Open ChrisWilcox78 opened 6 years ago

ChrisWilcox78 commented 6 years ago

Hi,

We've run into an issue when using the simplesearch plugin on IE11 and older versions of Edge: these browsers don't support foreach on a NodeList (as employed here). Moreover, it seems that this means that all of our js doesn't load on these browsers if we choose to pipeline the js.

Are these browsers meant to be supported by this plugin (or is there another strategy we should be employing to address the lack of support)?

ththompson commented 6 years ago

I found a simple work around. The form part still works, it just misses sending to the fancy URL. The following rewrite will get you there

RewriteCond %{QUERY_STRING} searchfield=(.*)
RewriteRule ^(.*) /search/query:%1