On Friday, June 15, 2012 5:28:54 AM UTC+2, tong123123 wrote:
I found in gwt 2.4, the ImageCell Class is
interface Template extends SafeHtmlTemplates{
@Template (img src=\{0}\/
SafeHtml img(String url);
}
so it will rise the warning
Template with variable in URL attribute
I found in gwt 2.4, the ImageCell Class is
interface Template extends SafeHtmlTemplates{
@Template (img src=\{0}\/
SafeHtml img(String url);
}
so it will rise the warning
Template with variable in URL attribute context:The template code
generator cannot guarantee HTML-safety of the
Okay that makes sense, thanks for the help!
-Dave
On Mar 21, 9:48 am, Thomas Broyer t.bro...@gmail.com wrote:
On Wednesday, March 21, 2012 4:15:10 PM UTC+1, dhoffer wrote:
I have a few questions about this.
If I change to:
interface Template extends SafeHtmlTemplates {
I have a few questions about this.
If I change to:
interface Template extends SafeHtmlTemplates {
@Template(img src=\{0}\/)
SafeHtml img(SafeUri safeUri);
}
1. How does the template know to call asString() on the safeUri
instance?
2. With this change I now have the same problem
On Wednesday, March 21, 2012 4:15:10 PM UTC+1, dhoffer wrote:
I have a few questions about this.
If I change to:
interface Template extends SafeHtmlTemplates {
@Template(img src=\{0}\/)
SafeHtml img(SafeUri safeUri);
}
1. How does the template know to call
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
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]