diff --git a/manipulation.go b/manipulation.go index d88114c..8bf86aa 100644 --- a/manipulation.go +++ b/manipulation.go @@ -598,10 +598,11 @@ func cloneNodes(ns []*html.Node) []*html.Node { // children but none of its parents or siblings. func cloneNode(n *html.Node) *html.Node { nn := &html.Node{ - Type: n.Type, - DataAtom: n.DataAtom, - Data: n.Data, - Attr: make([]html.Attribute, len(n.Attr)), + Type: n.Type, + DataAtom: n.DataAtom, + Data: n.Data, + Namespace: n.Namespace, + Attr: make([]html.Attribute, len(n.Attr)), } copy(nn.Attr, n.Attr) diff --git a/manipulation_test.go b/manipulation_test.go index 1119689..fd5e020 100644 --- a/manipulation_test.go +++ b/manipulation_test.go @@ -9,6 +9,28 @@ const ( wrapHtml = "