Hi guys, is there anyway to allow HTML code in the Option Comment field? It only allows plain text currently.
app/schemas/security/object_sanitization.php
replace:
'product_option' => array( SecurityHelper::SCHEMA_SECTION_FIELD_RULES => array( 'option_name' => SecurityHelper::ACTION_REMOVE_HTML, 'description' => SecurityHelper::ACTION_SANITIZE_HTML, 'comment' => SecurityHelper::ACTION_REMOVE_HTML, 'incorrect_message' => SecurityHelper::ACTION_REMOVE_HTML, ) )
with:
'product_option' => array( SecurityHelper::SCHEMA_SECTION_FIELD_RULES => array( 'option_name' => SecurityHelper::ACTION_REMOVE_HTML, 'description' => SecurityHelper::ACTION_SANITIZE_HTML, 'comment' => SecurityHelper::ACTION_SANITIZE_HTML, 'incorrect_message' => SecurityHelper::ACTION_REMOVE_HTML, ) )
then open design/themes/YOUR_THEME/templates/views/products/components/product_options.tpl and replace:
{$po.comment}
with
{$po.comment nofilter}
Then clear cache and check the result
Thank you for the guide. Unfortunately, this solution doesn't seem to work. html code still shows as plain text.
Thank you for the guide. Unfortunately, this solution doesn't seem to work. html code still shows as plain text.
Did you clear both system and templates cache?
Yes, I did clear both system and template cache. Still doesn't work.
If you are interested, please PM me temporary FTP access, we will check the issue