0

I am working on a plugin for EE3/4 which relies on a very specific html input naming structure.

A search form input may have a name attribute which looks like the following:

<input name="xy:State|City|Zip(contains)">

This causes the _clean_input_keys method in the EE_Input class to throw the 'Disallowed Key Characters' error which shows up in several posts on stack exchange.

The plugin that our company is building has a core library which is designed to work on any PHP based CMS. For example, my company has the same plugin in works for Craft CMS and it works just fine on that platform. This core library handles converting the above mentioned input naming schema into a query DSL for our service.

Do we have any options open to us concerning how to bypass the regex check the _clean_input_keys method performs? We would like to avoid changing our naming convention as it works very well in Craft CMS.

Thanks!

0

I had to modify one of my installations of EE3 to do exactly this. I needed to add pipe characters (|) and Japanese characters to URLS.

You should be able to find the _clean_input_keys function in system/legacy/core/Input.php around line 997.

change the regex to add what you need. If you need to add the pipe character, you might try this:

[a-z0-9:_\/ -|]

hope that helps.

1
  • That would if this were for a particular EE instance, but I need a solution that will work on any and all EE instances since this is a plugin. Thanks though! – Panda4Man Nov 28 '17 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.