Affects Version/s: 2.1.8, 220.127.116.11
Fix Version/s: 3.0
The Anchor tag is providing a default value for href attribute when it should not.
Previous versions of Struts2 did not do this, and in fact the documentation for the tag also says there is no default value.
However it is placing a default value of the current URL, rather than leaving the href attribute off altogether. (it is legal per HTML to not have an href attribute, and in fact we had existing code that was trying to purposely leave it off, but now instead of being left off, it is rendered with the current URL).
I believe the problem was introduced with the changes related to
WW-3037. This block of code (from Anchor.java) precisely:
To preserve documented and previous functionality of allowing href to not be rendered in the tag, the entire "else" block should be removed (of course that significantly negates
WW-3037 - which apparently didn't think about the fact that it is legit to not have an href for the anchor).