By Altitudes on Friday, 10 April 2015
Posted in Technical Issues
Replies 4
Likes 0
Views 745
Votes 0
Hello

In some languages, single quote character (or apostrophe) is used. This is the case in French, and in some rare cases in English. Here is a single quote: '

In ES Tooltips, these quotes are "backslashed" (see attached snapshot). How can this be handled? You can't use HTML entities in strings because they are not supported in tooltip. Maybe some change in code is needed on your side?

Thanks

Not fixed (applied a temporary fix in French language files)
Hi Altitudes,

I am really sorry for the delay of this reply as it is a weekend for us here.

We are still investigate on this, and we will get back to you as soon as possible.
·
Sunday, 12 April 2015 14:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

I am sorry for the delayed reply.
I have checked the code and consulted with our developers regarding this issue and I believe that this is an 'escape character'. It is intended to be there so that it will not break the code. Furthermore, this language string is in the 'attributes' and I believe it might break the HTML attributes in sites.

We advice you not to change this but if you're still insist of removing the ( \ ) in your tooltips, you can go to this file: /components/com_easysocial/themes/wireframe/toolbar/default.friends.php

and find this code:


data-original-title="<?php echo JText::_('COM_EASYSOCIAL_TOOLBAR_FRIEND_REQUESTS' , true );?>"


and update it to:


data-original-title="<?php echo JText::_('COM_EASYSOCIAL_TOOLBAR_FRIEND_REQUESTS');?>"


Please do understand that we are not to be held responsible should this damages your site. I'd highly suggest for you to back up your whole site before you proceed. Due to the nature for the character, this fix will not be included in the future releases.

Please advise.
·
Tuesday, 14 April 2015 13:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes sure, single quotes need to be escaped in a string when the string is enclosed in single quotes in code. In our particular case, string is enclosed in double quotes so escape is not needed.

I can understand that reviewing all your code to determine if escaping the single quotes is needed or not is a tedious task. Maybe that's not the good way to proceed, and you can think over it a bit again?

And if it is too complicated on your side, a workaround is to replace the single quotes by left quotes in the .ini string files, for strings used in tooltips. There are some, another example attached.

Regards
·
Tuesday, 14 April 2015 17:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, I think it's perfectly fine to allow a single quote in the tooltips and it makes sense. Single codes wouldn't break the html code anyways. The reason which we use the escape functionality on JText is to avoid translations that has double quotes. We'll see what we can do about this in the near future.
·
Wednesday, 15 April 2015 01:43
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post