From: Marc Englund Date: Thu, 19 Feb 2009 14:40:34 +0000 (+0000) Subject: CustomLayout no longer expects a space before "src=". fixes #2654 X-Git-Tag: 6.7.0.beta1~3107 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc1103da99cfc5d0cfebf5bf55a52a33af35e3e9;p=vaadin-framework.git CustomLayout no longer expects a space before "src=". fixes #2654 svn changeset:6908/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 0b218e796f..0e4f0aaa2c 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java @@ -223,12 +223,12 @@ public class ICustomLayout extends ComplexPanel implements Paintable, // prefix all relative image elements to point to theme dir with a // regexp search template = template.replaceAll( - "<((?:img)|(?:IMG)) ([^>]*)src=\"((?![a-z]+:)[^/][^\"]+)\"", + "<((?:img)|(?:IMG))\\s([^>]*)src=\"((?![a-z]+:)[^/][^\"]+)\"", "<$1 $2src=\"" + relImgPrefix + "$3\""); // also support src attributes without quotes template = template .replaceAll( - "<((?:img)|(?:IMG)) ([^>]*)src=[^\"]((?![a-z]+:)[^/][^ />]+)[ />]", + "<((?:img)|(?:IMG))\\s([^>]*)src=[^\"]((?![a-z]+:)[^/][^ />]+)[ />]", "<$1 $2src=\"" + relImgPrefix + "$3\""); // also prefix relative style="...url(...)..." template = template