]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added proper escaping to OptionGroup item icon URLs (#13310)
authorJuho Nurminen <juho@vaadin.com>
Mon, 3 Feb 2014 14:56:31 +0000 (16:56 +0200)
committerVaadin Code Review <review@vaadin.com>
Tue, 11 Feb 2014 11:57:52 +0000 (11:57 +0000)
Change-Id: Id0dea437e04e829567b31df3e9c496cd5adc09b8

client/src/com/vaadin/client/ui/VOptionGroup.java

index fee1c313f5ccc106598dcf82ffada96cb7a49047..fe4ef214cb24751fd662b6d3e2dbb7eaaf49c0b5 100644 (file)
@@ -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");