GWT in IE8: weird Anchor link behaviour

We use GWT on one of our projects. So the code we have is really trivial:

final Anchor title = new Anchor("RT @Test", "http://www.andrey-panasyuk.com");

What can be easier? Lets have a look at the markup generated by GWT in FireFox/Chrome:

<a href="http://www.andrey-panasyuk.com">RT @Test</a>

Lets now have a look at IE8:

<a href="http://www.andrey-panasyuk.com">http://www.andrey-panasyuk.com</a>

Instead of text I get my link. What the hell is going on here? This thing happens for any string like ” @” when passed as a title.
However is you do:

final Anchor title = new Anchor("", "http://www.andrey-panasyuk.com");
title.setHTML("RT @Test");

I get the correct answer in IE8 too:

<a href="http://www.andrey-panasyuk.com">RT @Test</a>

Looks like it’s a problem of IE8 since GWT code is absolutely straightforward and works perfectly fine in the rest of the browsers.

Advertisements
This entry was posted in Development and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s