diff options
author | Leonard Richardson <leonardr@segfault.org> | 2017-05-07 08:18:48 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2017-05-07 08:18:48 -0400 |
commit | 77f1bf0efe0142d5ad5ce84e09a364580a8b6743 (patch) | |
tree | a5b201b654eb3e8d93286ad3e999af19221315c0 /bs4/element.py | |
parent | 98a2e39b6d4bd9cad8a1c19110124e33e9ae4e54 (diff) |
Namespace prefix is preserved when an XML tag is copied. Thanks
to Vikas for a patch and test. [bug=1685172]
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py index 526db28..9ef75f8 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -870,7 +870,7 @@ class Tag(PageElement): Its contents are a copy of the old Tag's contents. """ clone = type(self)(None, self.builder, self.name, self.namespace, - self.nsprefix, self.attrs, is_xml=self._is_xml) + self.prefix, self.attrs, is_xml=self._is_xml) for attr in ('can_be_empty_element', 'hidden'): setattr(clone, attr, getattr(self, attr)) for child in self.contents: |