Quantcast
Channel: WordPress.org Forums » [UserAgent Themes Switcher] Support
Viewing all articles
Browse latest Browse all 3

Super PlugIn

$
0
0

Replies: 0

Super PlugIn. Thanks for creating it.

I noticed an issue related to case insensitive regular expressions;

^(.*(Google)).*$ – Finds any instance of Google, Googlebot, etc. in a User Agent String
^(.*(Google)).*$ – Does not find google in a User Agent String

^(.*(google)).*$ – Finds any instance of Google, Googlebot, etc. in a User Agent String
^(.*(google)).*$ – Does not find google in a User Agent String

^(.*(Google)).*$ – Does not find GOogle in a User Agent String
^(.*(Google)).*$ – Finds GoogleBot in a User Agent String

I attempted several variations of ‘activating’ case insensitivity using (?i), /google/i, #google#i, plus various PHP quirks with regular expressions, and the \ escape in several places.

And it gets weirder;

^(.*(Google.*|google.*)).*$
^(.*(Google|google)).*$
…both of the above regular expressions result in a very odd hybrid returned to the browser that includes elements from both themes installed on the website.

I’m using a feature of Google Chrome to test various User Agent Strings on this website: https://FSCNS.com

Not complaining, just trying to help make the plugin better by pointing something out you might have missed.

No need to reply unless you need more information that I can provide to assist you.

The PlugIn does actually work perfectly with Google / Googlebot as Google always uses a capital G in Google.

Thanks again for making it.


Viewing all articles
Browse latest Browse all 3

Trending Articles