Commit 9725a83d authored by Jeffrey I. Schiller's avatar Jeffrey I. Schiller

Escape some strings

To avoid XSS injection

Change-Id: I767cdffcff48545f9aec400b53eca6944130513d
parent dba889f8
...@@ -54,6 +54,7 @@ import com.google.gwt.event.dom.client.TouchMoveEvent; ...@@ -54,6 +54,7 @@ import com.google.gwt.event.dom.client.TouchMoveEvent;
import com.google.gwt.event.dom.client.TouchStartEvent; import com.google.gwt.event.dom.client.TouchStartEvent;
import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand; import com.google.gwt.user.client.DeferredCommand;
...@@ -775,7 +776,7 @@ public abstract class MockComponent extends Composite implements PropertyChangeL ...@@ -775,7 +776,7 @@ public abstract class MockComponent extends Composite implements PropertyChangeL
// used to get HTML for the iconImage. AbstractImagePrototype requires // used to get HTML for the iconImage. AbstractImagePrototype requires
// an ImageResource, which we don't necessarily have. // an ImageResource, which we don't necessarily have.
TreeItem itemNode = new TreeItem( TreeItem itemNode = new TreeItem(
new HTML("<span>" + iconImage.getElement().getString() + getName() + "</span>")) { new HTML("<span>" + iconImage.getElement().getString() + SafeHtmlUtils.htmlEscapeAllowEntities(getName()) + "</span>")) {
@Override @Override
protected Focusable getFocusable() { protected Focusable getFocusable() {
return nullFocusable; return nullFocusable;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment