gstackoverflow
gstackoverflow

Reputation: 36984

spring security escaping for username issue

I have following code:

var shpa =  "<sprSec:authentication property="principal.username" />";

it renders to

var shpa = "mihailov&#45;ta&#43;spam33&#64;ya&#46;ru";

It is problem looks like escaping. it should be render like:

var shpa = "[email protected]";

How to encode it according my requirements ?

Upvotes: 0

Views: 449

Answers (1)

Normal
Normal

Reputation: 1367

You should use htmlEscape attribute of sprSec:authentication. See that.
Example:
<sprSec:authentication property="principal.username" htmlEscape=false />

Upvotes: 1

Related Questions