By Peter Bauer on Wednesday, 06 February 2019
Posted in General Issues
Replies 5
Likes 0
Views 445
Votes 0
I play around with language strings and put some icons and little images in the string. That works pretty fine at all, but the icons are not rendered on every place. Please have a look at the attachment.
There's no hurry, but is it possible to fix this someday ?

greetings
Peter
Hi Peter,

Thank you for your concern regarding on this matter. The main reason why we didn't allow some HTML code to be rendered in language string is because the translator was made by the public community at the Transifex and there are some cases before where some translation made by them are causing the entire page to be broken due to the improper format of the HTML in the translation.

There are also some languages in the world that using utf8mb4 character string such as Chinese character and Arabic that sometimes can messed up the HTML on the page. Hence a proper sanitizing is required to ensure those languages can be load correctly on the site.

If you would like to remove the sanitize process, you can go to your components/com_easysocial/themes/wireframe/helpers/miniheader/clusters.php and change the following code at line 25:


<a href="<?php echo $permalink;?>" class="es-cluster-header__title-link"><?php echo $this->html('string.escape', $title);?></a>


change it to


<a href="<?php echo $permalink;?>" class="es-cluster-header__title-link"><?php echo $title;?></a>


Additionally, you can use template override method to ensure the file will not get overwritten during update, https://stackideas.com/docs/easysocial/administrators/templating/template-overrides .

Hope these can clarify the issue here.
·
Thursday, 07 February 2019 16:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Peter,

It is not advisable to put HTML code directly in the language string as it could cause some unexpected issue with the incorrect HTML structure in the theme file itself. Additionally some of the rendered string were sanitized in order to ensure the rendered string is pure text across EasySocial.

Furthermore, the placeholder attribute for <textarea> will not accept any form of HTML tag and there is nothing we can do about it. You can try it out by placing the textarea code below in one of the theme file and see the rendered placeholder will not convert the <b> tag, https://take.ms/xKI7R .

<textarea placeholder="<b>hello world</b>"></textarea>


Hope these help.
·
Thursday, 07 February 2019 12:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

It may be a little dirty "go around the code" trick to put images in the language string and cause unexpected issues, but it works well in many cases on my site (more precisely in all but the above) - in Joomla itself, HIKASHOP component and ES too. I don't see a reason to restrict the pages-category header to a pure textarea.
There is no hurry, but maybe you could discuss this in the developer team, when the early 2019 rush is over.

grettings
Peter
·
Thursday, 07 February 2019 15:46
·
0 Likes
·
0 Votes
·
0 Comments
·
You're still the best support team - ever !!
·
Thursday, 07 February 2019 17:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Peter.
·
Thursday, 07 February 2019 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post