aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/Util.java3
-rw-r--r--client/src/com/vaadin/client/ui/VOptionGroup.java5
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/Slot.java6
3 files changed, 9 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java
index edbb40e86c..7cf8338171 100644
--- a/client/src/com/vaadin/client/Util.java
+++ b/client/src/com/vaadin/client/Util.java
@@ -1344,7 +1344,8 @@ public class Util {
divElement.getStyle().setDisplay(Display.NONE);
RootPanel.getBodyElement().appendChild(divElement);
- divElement.setInnerHTML("<a href='" + escapeHTML(url) + "' ></a>");
+ divElement.setInnerHTML("<a href='" + escapeAttribute(url)
+ + "' ></a>");
AnchorElement a = divElement.getChild(0).cast();
String href = a.getHref();
diff --git a/client/src/com/vaadin/client/ui/VOptionGroup.java b/client/src/com/vaadin/client/ui/VOptionGroup.java
index fee1c313f5..fe4ef214cb 100644
--- a/client/src/com/vaadin/client/ui/VOptionGroup.java
+++ b/client/src/com/vaadin/client/ui/VOptionGroup.java
@@ -142,8 +142,9 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
String icon = opUidl.getStringAttribute("icon");
if (icon != null && icon.length() != 0) {
String iconUrl = client.translateVaadinUri(icon);
- itemHtml = "<img src=\"" + iconUrl + "\" class=\""
- + Icon.CLASSNAME + "\" alt=\"\" />" + itemHtml;
+ itemHtml = "<img src=\"" + Util.escapeAttribute(iconUrl)
+ + "\" class=\"" + Icon.CLASSNAME + "\" alt=\"\" />"
+ + itemHtml;
}
String key = opUidl.getStringAttribute("key");
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
index 37a97f3399..efa19895a8 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
@@ -474,7 +474,8 @@ public final class Slot extends SimplePanel {
// Made changes to DOM. Focus can be lost if it was in the
// widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget
+ .getElement().isOrHasChild(focusedElement));
}
} else if (caption != null) {
orphan(widget);
@@ -485,7 +486,8 @@ public final class Slot extends SimplePanel {
captionWrap = null;
// Made changes to DOM. Focus can be lost if it was in the widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget.getElement()
+ .isOrHasChild(focusedElement));
}
// Caption text