Problem with html entities in title attribute

136 views
Skip to first unread message

Cim balli

unread,
Oct 27, 2014, 10:00:16 PM10/27/14
to ang...@googlegroups.com
Hi, I have a problem with HTML entities in the title attribute of an anchor element.

Here is the snippet :
<a href="#/home" ng-attr-title="{{'TEXT' | translate}}">

The output is :
<a href="#/home" ng-attr-title="{{'TEXT' | translate}}" title="&egrave;t&eacute;es">

And the translation is :
'TEXT' : '&egrave;t&eacute;es'

What should I do in order for the browser to display the real characters and not the entities ?

Thanks !

Cimballi

Anton Trapp

unread,
Oct 29, 2014, 1:14:33 AM10/29/14
to ang...@googlegroups.com
Tried to put the UTF-8 characters into the title? Apart from double quotes and ampersands everything should work just fine if the file is UTF-8 and the browser accepts it (
<meta http-equiv="Content-type" content="text/html; charset=utf-8">).

Cim balli

unread,
Oct 29, 2014, 11:58:18 AM10/29/14
to ang...@googlegroups.com
If I put <a href="#/home" title="&egrave;t&eacute;es"> then output is <a href="#/home" title="ètées">

And if I put <a href="#/home" title="{{'TEXT' | translate}}"> then output is <a href="#/home" title="&egrave;t&eacute;es">

So it seems that it's really a problem with AngularJS and / or the translate module.

Cim balli

unread,
Oct 29, 2014, 12:02:42 PM10/29/14
to ang...@googlegroups.com
In fact maybe it's related to the problem mentioned here :
Reply all
Reply to author
Forward
0 new messages