Fixes issue 2274. Our history tokens weren't always being escaped, causing
equal tokens to not compare as equal, so spurious History entries.

Modified:
  trunk/user/src/com/google/gwt/user/client/impl/HistoryImplIE6.java

patch by: ajr
reviewed by: jgw



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2755 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/impl/HistoryImplIE6.java b/user/src/com/google/gwt/user/client/impl/HistoryImplIE6.java
index 82d2a88..4b0140f 100644
--- a/user/src/com/google/gwt/user/client/impl/HistoryImplIE6.java
+++ b/user/src/com/google/gwt/user/client/impl/HistoryImplIE6.java
@@ -115,7 +115,9 @@
   @Override
   protected native void newItemImpl(Element historyFrame, String historyToken, boolean forceAdd) /*-{
     historyToken = @com.google.gwt.user.client.impl.HistoryImplIE6::escapeHtml(Ljava/lang/String;)(historyToken || "");
-    if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) {
+    var encodedGwtHistoryToken = @com.google.gwt.user.client.impl.HistoryImplIE6::escapeHtml(Ljava/lang/String;)($wnd.__gwt_historyToken || "");
+
+    if (forceAdd || (encodedGwtHistoryToken != historyToken)) {
       var doc = historyFrame.contentWindow.document;
       doc.open();
       doc.write('<html><body onload="if(parent.__gwt_onHistoryLoad)parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)"><div id="__gwt_historyToken">' + historyToken + '</div></body></html>');