Page 1 of 1

Input field starts with & appends ;

Posted: 2015-09-14 13:41
by elemire
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.

Re: Input field starts with & appends ;

Posted: 2015-09-15 06:14
by a.gneady
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.

Re: Input field starts with & appends ;

Posted: 2015-09-17 14:31
by elemire
Thanks once again for all your help!

Re: Input field starts with & appends ;

Posted: 2015-09-22 11:52
by a.gneady
You're welcome :)