From: Marc Englund Date: Thu, 19 Feb 2009 14:07:11 +0000 (+0000) Subject: CustomLayout now prefixes inline styles with url(). Fixes #2653 X-Git-Tag: 6.7.0.beta1~3108 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c552f44e215783d4d8fb7f46a4c11198c227958d;p=vaadin-framework.git CustomLayout now prefixes inline styles with url(). Fixes #2653 svn changeset:6907/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java index 452621dbc1..0b218e796f 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java @@ -225,11 +225,16 @@ public class ICustomLayout extends ComplexPanel implements Paintable, template = template.replaceAll( "<((?:img)|(?:IMG)) ([^>]*)src=\"((?![a-z]+:)[^/][^\"]+)\"", "<$1 $2src=\"" + relImgPrefix + "$3\""); - // also support src attributes without quotas + // also support src attributes without quotes template = template .replaceAll( "<((?:img)|(?:IMG)) ([^>]*)src=[^\"]((?![a-z]+:)[^/][^ />]+)[ />]", "<$1 $2src=\"" + relImgPrefix + "$3\""); + // also prefix relative style="...url(...)..." + template = template + .replaceAll( + "(<[^>]+style=\"[^\"]*url\\()((?![a-z]+:)[^/][^\"]+)(\\)[^>]*>)", + "$1 " + relImgPrefix + "$2 $3"); getElement().setInnerHTML(template);