mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Use BeautifulSoup to remove tags
This commit is contained in:
parent
9f5c58c173
commit
80802a74cd
@ -129,10 +129,9 @@ class FakeCheckAndRepairResults(object):
|
||||
|
||||
class WebResultsRendering(unittest.TestCase):
|
||||
|
||||
def remove_tags(self, s):
|
||||
s = re.sub(r'<[^>]*>', ' ', s)
|
||||
s = re.sub(r'\s+', ' ', s)
|
||||
return s
|
||||
@staticmethod
|
||||
def remove_tags(html):
|
||||
return BeautifulSoup(html).get_text()
|
||||
|
||||
def create_fake_client(self):
|
||||
sb = StorageFarmBroker(True, None, EMPTY_CLIENT_CONFIG)
|
||||
|
Loading…
Reference in New Issue
Block a user