less-than sign (<) not possible as part of value in custom fields

  • Posts: 94
  • Thank you received: 2
  • Hikashop Business
3 years 9 months ago #328785

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.4
-- Browser(s) name and version -- : FF 84.0.2
-- Error-message(debug-mod must be tuned on) -- : Not applicable

Hi,

Trying to use the less-than sign (< or

&lt;
) as part of a value of a custom field. It doesn't work while the greater-than sign (>) does. See screenshot. What to do about this?

Cheers,
Remco

Attachments:
Last edit: 3 years 9 months ago by RustyHika.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 9 months ago #328797

Hi,

Thank you for your feedback.
I found the issue is related to Joomla's filtering for security.
Change the code:

$field->field_value[] = $safeHtmlFilter->clean($title,'string'). '::' .  $safeHtmlFilter->clean($value,'string') . '::' .  $safeHtmlFilter->clean($disabled,'string');
to:
$field->field_value[] = $safeHtmlFilter->clean($title,'raw'). '::' .  $safeHtmlFilter->clean($value,'raw') . '::' .  $safeHtmlFilter->clean($disabled,'string');
in the file administrator/components/com_hikashop/classes/field.php and it will fix the problem.

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

  • Posts: 94
  • Thank you received: 2
  • Hikashop Business
3 years 9 months ago #328950

Hi Nicolas,

Should I make an override or will this be fixed in the following update?

Cheers,
Remco

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 9 months ago #328951

Hi,

You can directly modify the file.
This will be included in the next version so no worries for future updates.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum