From 4c443b8ac5608dc935194120813dfc53814b05ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Emonet?= Date: Tue, 7 Aug 2012 12:38:01 +0200 Subject: [PATCH] fixed relative # url (for in-file definitions) --- jquery.svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.svg.js b/jquery.svg.js index ee63aa4..910d24c 100644 --- a/jquery.svg.js +++ b/jquery.svg.js @@ -996,7 +996,7 @@ $.extend(SVGWrapper.prototype, { var base = url.replace(/\/[^\/]*$/, '/'); $("*[xlink\\:href]", data.documentElement).each( function(i,el) { var href = $(el).attr('xlink:href')+""; - if (!href.match(/(^[a-z]([-a-z0-9+.])*:.*$)|(^\/.*$)/i)) { + if (!href.match(/(^[a-z]([-a-z0-9+.])*:.*$)|(^\/.*$)/i) && href[0] != '#') { // only consider relative href $(el).attr('xlink:href', base + $(el).attr('xlink:href')); }