On Monday, April 23, 2012 7:25:59 PM UTC+2, Patrick Tucker wrote:
>
> 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?
>
See comments in http://gwt-code-reviews.appspot.com/1447812
John thought that using SafeUri outside a URL attribute would likely be a
dev mistake; so the solution really is to add another argument to your
SafeHtmlTemplates method.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/3wLQ6FfqFe8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.