Skip to content

Inconsistent namespaced attribute access for SVG nested in HTML #861

Closed
@mikepfirrmann

Description

@mikepfirrmann

Nokogiri::XML::Node.[] and Nokogiri::XML::Node.attribute return different values for namespaced attributes of SVGs nested within HTML documents.

For example, if you call try and access the value of the xlink:href attribute of a nested SVG image node, image["xlink:href"] returns nil while image.attribute("xlink:href") will return the actual value.

This issue appears to affect versions 1.5.6 and above.

Demonstration script

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions