Search code examples
javascriptspring-securityiso-8859-1

spring security: dot in username on jsp page


I'm using Spring Security 3.1.2.

When username contains dot, following code:

<sec:authentication property="principal.username"/>

returns value user&#46;name when the username is user.name.

It seems that it's ISO 8859-1 character set notation.

Is there any way to convert it to it's usual notation using javascript?

Thank you for any help!


Solution

  • The authentication tag does escaping for HTML by default.

    You can set the escapeHtml attribute to false in the tag if you want to disable this.