You should use GWT's UriUtils to construct a SafeUri and your template 
method should then take a SafeUri as parameter instead of a string.

-- J.


Am Dienstag, 20. März 2012 20:22:59 UTC+1 schrieb dhoffer:
>
> I get the following error:
>
> [INFO] Generating method body for img()
> [INFO] [WARN] Template with variable in URL attribute context: The
> template code generator cannot guarantee HTML-safety of the template
> -- please inspect manually or use SafeUri to specify arguments in a
> URL attribute context
>
> Using this code template
>
> interface Template extends SafeHtmlTemplates {
>         @Template("<img src=\"{0}\"/>")
>         SafeHtml img(String url);
> }
>
> What's the right way to make this HTML safe?  The url string is
> provided by the application not end users of the application.  However
> I'd like to not have build warnings of this type.
>
> -Dave
>
>

-- 
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/-/XYjWmzKpT9kJ.
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.

Reply via email to