Skip to content

Instantly share code, notes, and snippets.

@jgsogo
Created August 29, 2012 13:55
Show Gist options
  • Save jgsogo/3512899 to your computer and use it in GitHub Desktop.
Save jgsogo/3512899 to your computer and use it in GitHub Desktop.
def get_cleaned_bbcode(self):
"""
returns a cleaned version of the self.text bbcode.
"""
if self.bbcode_bitfield:
bbcode_uid = self.bbcode_uid
else:
bbcode_uid = None
properUTF8string = unicode(self.text, 'utf-8')
return clean_bbcode(properUTF8string, bbcode_uid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment