summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-04-16 09:07:08 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2012-04-16 09:07:08 -0400
commitc40bc98de62545aa8855311a1d046af5cd9020ba (patch)
tree5ae3d729a91f07b571ae4d05558161f39dcb61a5 /bs4/element.py
parent55538ee74f6e0b28818e6a62d6160d910a55b2ec (diff)
Fixed a bug with the string setter that moved a string around the
tree instead of copying it. [bug=983050]
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py
index 7935cb1..496f2ad 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -758,7 +758,7 @@ class Tag(PageElement):
@string.setter
def string(self, string):
self.clear()
- self.append(string)
+ self.append(unicode(string))
def _all_strings(self, strip=False):
"""Yield all child strings, possibly stripping them."""