We have a template that we are converting to using SafeHtml and SafeUri, but ran into a problem.
The template looks something like this:
<a href="{0}" ...>{0}</a>
Argument 0 is the URL, if we change the value from String to SafeUri we get the following error:
[ERROR] SafeUri can only be used as the entire value of a URL attribute. Did you mean to use java.lang.String or SafeHtml instead?
The only way around this is to keep the argument a String or add another argument that is a SafeHtml of the URL. Neither of these options seems ideal to me.
Thoughts? I don't see any reason why a valid URL can not be considered SafeHtml?