Special characters conversion in custom fields

  • Posts: 2
  • Thank you received: 0
6 years 8 months ago #275565

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.4
-- PHP version -- : 5.6.30
-- Browser(s) name and version -- : Firefox for Ubuntu 54.0
-- Error-message(debug-mod must be tuned on) -- : No specific error message.

I made several custom fields for product characteristics. One of them is screen size in inches. When I put there something like: 5.0" 1280х720px the quotation mark after the five is converted into " on save. Well, It is ok. But the next time I save the product the " is converted into " which becomes &" on the next save and so on.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13070
  • MODERATOR
6 years 8 months ago #275568

Hi,

Change the line:

return '<input id="'.$this->prefix.@$field->field_namekey.$this->suffix.'"'.$size.$js.' '.$options.' type="'.$this->type.'" name="'.$map.'" value="'.htmlentities($value, ENT_COMPAT, 'UTF-8').'" />';
to:
return '<input id="'.$this->prefix.@$field->field_namekey.$this->suffix.'"'.$size.$js.' '.$options.' type="'.$this->type.'" name="'.$map.'" value="'.$value.'" />';
in the file administrator/components/com_hikashop/classes/field.php in order to fix the behavior. We'll add that patch on our end with the next version.
Also, you might have to turn off the "input filtering" setting of the custom field.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum