I'm trying to create a repro case... but strangely enough there seems to be more involved. A straightforward demo does not expose the problem. So there must be something else that is causing this. I'll keep on searching.
On Wed, May 21, 2014 at 11:12 AM, Thomas Broyer <t.broyer@gmail.com> wrote:
I think it's a bug though that HasSafeHtml works but not HasHTML.If you can provide a small repro case, please file a bug in the tracker.That said, it's really surprising that there's a difference, as there's no special parser for HasSafeHtml (that itself is probably a bug: that means a widget implementing HasSafeHtml but not HasHTML couldn't use child content and must use an HTML="foo bar" attribute). There probably is some reflection in play that sees the setHTML(SafeHtml) and uses it instead of setHTML(String), but still the result is surprising.
As for » vs & I can understand it: those are "evaluated" by the XML parser and (I believe, haven't checked) UiBinder doesn't see them; but the "&" cannot be output as is and must be escaped, contrary to "»". I believe you won't find » in the generated code, but ».
On Wednesday, May 21, 2014 10:43:06 AM UTC+2, stuckagain wrote:It turns out that my custom widget was the root of the problem.It implements HasHTML but not HasSafeHtml (I thought I had it implemented).It is strange that the » was properly showing, but not & or & that threw me off a bit.David
On Wednesday, May 21, 2014 9:45:25 AM UTC+2, stuckagain wrote:I have to revive this thread. I just stumbled on the same problem in my UiBinder file. This really looks like a bug in GWT UiBinder.I am using a different widget than Label (my own custom Button class that extends HasHTML and HasSafeHtml).I include the entity line:<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">and then I have this in my UiBinder:<w:Button ui:field="button">View and manage all user roles (own & delegated) »</w:Button>The » is properly showing the right double arrow sign, the & is not properly showing.I also tried to use & instead of & but it gets printed as "&"So, this must be a bug in GWT UiBinder (not in SafeHtmlBuilder I tried that one already).David
On Thursday, December 16, 2010 1:07:23 AM UTC+1, Hilco Wijbenga wrote:On 15 December 2010 15:06, Nick Newman <nick.x...@gmail.com> wrote:
> You say that using A & B & C obviously fails (because the ampersand is
> illegal in the XML). Does using a CDATA section to make it legal work?:-) Nice one! Yes, GWT finds that acceptable.
Unfortunately, I still need to use g:HTML instead of g:Label as Mauro
indicated. It's not a very big deal since the generated HTML is the
same except for the CSS class name used. I just wish I could treat all
labels the same.--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment