Input field starts with & appends ;

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
elemire
Posts: 8
Joined: 2015-09-11 18:17

Input field starts with & appends ;

Post by elemire » 2015-09-14 13:41

Hi everyone, I am working on an inventory database for my company, and someone decided it would be a smart idea to have product codes which start with &. The problem I am running into is when we go to enter this into the AppGini database we have created the code is automatically appending a ; to the end of the field, I assume this is because the input is being treated as code and not as a literal string.

Is there any way to change the input text box so it treats the code as literal text and not code. Its not a huge deal to have the software append the ; our operators just have to remember to drop it when adding the product number to our other systems.

Any help or suggestions would be greatly appreciated.

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Input field starts with & appends ;

Post by a.gneady » 2015-09-15 06:14

That's a very weird bug in a 3rd party component used by AppGini. I guess this fixes it: Open the generated ci_input.php file in a text editor, and find this line (line 563 if your text editor can't find it):

Code: Select all

$str = preg_replace('#(&\#?[0-9a-z]{2,})([\x00-\x20])*;?#i', "\\1;\\2", $str);
Change it to:

Code: Select all

$str = preg_replace('#(&\#[0-9a-z]{2,})([\x00-\x20])*;?#i', "\\1;\\2", $str);
We'll make further tests on this and if all is fine, will add it to next release.
:idea: AppGini plugins to add more power to your apps:

elemire
Posts: 8
Joined: 2015-09-11 18:17

Re: Input field starts with & appends ;

Post by elemire » 2015-09-17 14:31

Thanks once again for all your help!

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Input field starts with & appends ;

Post by a.gneady » 2015-09-22 11:52

You're welcome :)
:idea: AppGini plugins to add more power to your apps:

Post Reply