Skip to main content

ascii code

More
1 year 6 months ago #366237 by jouwnaambord.nl
ascii code was created by jouwnaambord.nl
-- url of the page with the problem -- : www.jouwnaambord.nl
-- HikaShop version -- : 5.1.5
-- Joomla version -- : latest
-- PHP version -- : latest
-- Browser(s) name and version -- : Firefox - latest
-- Error-message(debug-mod must be tuned on) -- : no error

Hi, when i make Characteristics and ad some values in the name i use text ans a ascii code.
When i save the values i see the text right and also i see the ascii code right.
But in the product on the frontpage i see the text right but the ascii code as ascii code.
What to do to see the ascii code on the frontpage right.

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

More
1 year 6 months ago #366240 by nicolas
Replied by nicolas on topic ascii code
Hi,

This is handled by Joomla's HTML library for selects.
It comes from the line:
Code:
$html .= $options['option.text.toHtml'] ? htmlentities(html_entity_decode($text, ENT_COMPAT, 'UTF-8'), ENT_COMPAT, 'UTF-8') : $text;
in the file libraries/src/HTML/Helpers/Select.php
If you change it to:
Code:
$html .= $text;
it will allow for these codes to be displayed in the dropdowns. Note that this will affect all the dropdowns in Joomla.
I'm not sure if it could have consequences elsewhere.
Also, you would have to do the change again each time you update Joomla and this Select.php file is updated by Joomla.

A cleaner way to do it would be to modify the line:
Code:
$html = JHTML::_('select.'.$characteristic->characteristic_display_method.'list', $this->values, @$characteristic->characteristic_id, 'class="'.HK_FORM_SELECT_CLASS.'" size="1"' . $options, 'value', 'text', $selected, $id );
to be able to pass that option.text.toHtml option to Joomla in the file product / show_block_characteristic via the menu Display>Views.
However, I'm not sure how to change this code to allow for this.

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

More
1 year 6 months ago #366287 by jouwnaambord.nl
Replied by jouwnaambord.nl on topic ascii code
Hi Nicolas,

Thx for your answer.
I think i must fix this another way.
Becouse Joomla! has freqently a update, and change this line every time that will be forget.

Fred

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

More
1 year 6 months ago #366289 by nicolas
Replied by nicolas on topic ascii code
Hi,

So, I've looked into it today. Change the line:
Code:
$html = JHTML::_('select.'.$characteristic->characteristic_display_method.'list', $this->values, @$characteristic->characteristic_id, 'class="'.HK_FORM_SELECT_CLASS.'" size="1"' . $options, 'value', 'text', $selected, $id );
to:
Code:
$html = JHTML::_( 'select.'.$characteristic->characteristic_display_method.'list', $this->values, @$characteristic->characteristic_id, array( 'list.attr' => 'class="'.HK_FORM_SELECT_CLASS.'" size="1"' . $options, 'list.select' => $selected, 'id' => $id, 'option.text.toHtml' => false, ), );
in the file product / show_block_characteristic via the menu Display>Views and it will allow for HTML entities in the characteristic values.

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

Time to create page: 0.174 seconds
Powered by Kunena Forum