Bug 148477

Summary: [Regression] Inline SVG xlink:href – differing behaviour with #name and #id
Product: WebKit Reporter: Graham Bell <graham.6311>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: peter, sabouhallawa, zimmermann
Priority: P2    
Version: Safari 8   
Hardware: Mac   
OS: OS X 10.10   
See Also: https://bugs.webkit.org/show_bug.cgi?id=91520
https://bugs.webkit.org/show_bug.cgi?id=223161
Attachments:
Description Flags
Demonstration of differing behaviour with #id and #name none

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 ***