Skip to content

encoding/xml: disallow attributes named xmlns:* #8167

Open
@gopherbot

Description

@gopherbot

by opennota:

The Encoder will add namespaced to the elements, even if there are the same namespaces
in the parent element:
http://play.golang.org/p/LDRJCxUJHX

// Output:
// <p xmlns="http://www.gribuser.ru/xml/fictionbook/2.0";
xmlns:l="http://www.w3.org/1999/xlink";><a
xmlns="http://www.gribuser.ru/xml/fictionbook/2.0";
xmlns:xlink="http://www.w3.org/1999/xlink";
xlink:href="http://google.com";>google.com</a></p>

I expect it to not repeat the namespaces:

// <p xmlns="http://www.gribuser.ru/xml/fictionbook/2.0";
xmlns:l="http://www.w3.org/1999/xlink";><a
l:href="http://google.com";>google.com</a></p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.early-in-cycleA change that should be done early in the 3 month dev cycle.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions