def test_strip_links(self): self.assertEqual("on my mind", strip_links("<a href='almost'>on my mind</a>")) self.assertEqual("on my mind", strip_links("<A href='almost'>on my mind</A>")) self.assertEqual( "on my mind\nall day long", strip_links("<a href='almost'>on my mind</a>\n<A href='almost'>all day long</A>"), )
def remove_user_link(actor): return wbtools.strip_links(actor)
def serialize(self, field, cstruct, readonly=False): if cstruct in (null, None): cstruct = '' #pragma : no cover return super(TextAreaWidget, self).serialize(field, strip_links(cstruct), readonly)