Bug 148477 - [Regression] Inline SVG xlink:href – differing behaviour with #name and #id
Summary: [Regression] Inline SVG xlink:href – differing behaviour with #name and #id
Status: RESOLVED DUPLICATE of bug 223161
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 8
Hardware: Mac OS X 10.10
: P2 Normal
Assignee: Nobody
: 192623 (view as bug list)
Depends on:
Reported: 2015-08-26 08:21 PDT by Graham Bell
Modified: 2021-03-22 12:34 PDT (History)
3 users (show)

See Also:

Demonstration of differing behaviour with #id and #name (1.84 KB, text/html)
2015-08-26 08:21 PDT, Graham Bell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Bell 2015-08-26 08:21:03 PDT
Created attachment 259951 [details]
Demonstration of differing behaviour with #id and #name

<a xlink:href="#…"> within inline SVG links to a local IRI for a target resource within the same document. In Safari 8.0.8 and nightly builds up to at least Webkit r.188939, this works when the IRI uses the name attribute of the target anchor – but the name attribute is deprecated in HTML5 in favour of using element IDs. However, xlink:href does not link successfully when the IRI uses the id attribute of the target resource (whether it is an <a> anchor or an ordinary element). In contrast, Chrome, Firefox and earlier versions of Safari (eg 5.1) work as expected with IDs.

Possibly similar to Webkit Bugzilla 91520, but does not require target resource to be external.
Comment 1 Graham Bell 2017-09-28 12:36:43 PDT
See also https://bugs.chromium.org/p/chromium/issues/detail?id=296071 in Chromium from 2013 – same or similar
Comment 2 Alexey Proskuryakov 2018-12-12 14:27:43 PST
*** Bug 192623 has been marked as a duplicate of this bug. ***
Comment 3 Peter Krautzberger 2018-12-13 08:00:45 PST
FWIW, the Blink issue was resolved in 2014 and the one-line-fix appears to still be applicable to WebKit when comparing https://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGAElement.cpp?r1=172722&r2=172721&pathrev=172722 and  https://svn.webkit.org/repository/webkit/trunk/Source/WebCore/svg/SVGAElement.cpp.
Comment 4 Said Abou-Hallawa 2021-03-22 12:34:18 PDT

*** This bug has been marked as a duplicate of bug 223161 ***