VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: d0ublezer0 on March 18, 2012, 08:16:22 AM

Title: Custom fields bug (quotation mark)
Post by: d0ublezer0 on March 18, 2012, 08:16:22 AM
When edit custom fields in product manager, I set the value of some fields (waist size, for example) to 32" (digit with quotation mark) - after save i've got list of fields without quotation marks (only digits).
In page code i see this:
<input type="text" name="field[0][custom_value]" "="" value="32">
As you can see, quotation mark are displayed separately, as attribute of text field.
But in database table custom value stored as I entered in previous stage (with quotation mark).

When i do another save of product, quotation marks was removed from database.

2.0.3e
Title: Re: Custom fields bug (quotation mark)
Post by: MarioP on January 16, 2013, 11:03:12 AM
Hello,
I'm working on VM 2.0.16 and the problem still exists. I'm setting the custom field type as string. When I set the value of this field to e.g.  2", after save i've got the value without quotation mark (only digit). How can I fix it? Please help
Title: Re: Custom fields bug (quotation mark)
Post by: franzpeter on January 16, 2013, 11:14:53 AM
I think the quotation marks are filtered out, because they may disturb php code. It is not a very good idea to use quotation marks or - if absolutely necessary - they should get encoded with &quot;.
Title: Re: Custom fields bug (quotation mark)
Post by: MarioP on January 16, 2013, 12:26:51 PM
Thanks franzpeter. &quot; seems to be working. Even thought the field value it's not display properly in the back-end, in the front-end it's ok. (e.g. I've set the value on 15&quot; - after save in back-end appears 15, in front-end - 15") 
Title: Re: Custom fields bug (quotation mark)
Post by: d0ublezer0 on March 01, 2013, 18:23:31 PM
OK, OK. But the processing of the text must be in the system by default.
We must not cut, and add escape characters. Replace some of the characters to their counterparts.
e.g. &quot; &lt; &rt;
Title: Re: Custom fields bug (quotation mark)
Post by: MarioP on February 14, 2014, 09:56:13 AM
Hi,
Maybe in the meanwhile someone has found a solution to permanently put quotation marks in the custom field? &quot; works but like was mentioned is removed after next product edit (saving the product) what is very annoying when we have to edit a few products.
Maybe there's no way, and will not be the way to solve that problem due to
Quote from: franzpeter on January 16, 2013, 11:14:53 AM
I think the quotation marks are filtered out, because they may disturb php code.
Thanks for any information