Esempio n. 1
0
 def htmlfrombbcode(self):
     soup = BeautifulSoup(self.message)
     #remove all html tags from the message
     onlytext = ''.join(soup.findAll(text=True))
     
     #get the bbcode for the text
     if(len(onlytext.strip()) >  0):            
         return render_bbcode(onlytext)
     else :
         return ""
Esempio n. 2
0
 def htmlfrombbcode(self):
     if(len(self.message.strip()) >  0):
         return render_bbcode(self.message)
     else :
         return ""