When I checked a code yesterday, I've seen a line that was very strange for me.
There's a condition in JS code which is checking a string passed by parameter in this way "%%unsubscribe%%"
. Please check the below line for reference
if (link.attr("href").equalsIgnoreCase("%%unsubcriber%%"))
There's another reference in JSP page that is also very strange to me.
<a style="color: rgb(153, 153, 153); " href="%%unsubcriber%%">Unsubscribe</a>
Please help me out, why we use double %
in Java?.
Looks like template placeholders. If you look elsewhere in the code, you're likely to find somewhere that the code is taking a string containing that HTML and doing a
replace
orreplaceAll
on it, converting%%unsubscriber%%
to someone's name/username.