Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)
>>> clean_bbcode('DjangoBB <!-- m --><a class="postlink" href="http://djangobb.org/">trac</a><!-- m --> page.')
u'DjangoBB [url=http://djangobb.org/]trac[/url] page.'

>>> clean_bbcode(
...     u'Look at [url=https&#58;//github&#46;com/jedie/PyLucid/views&#46;py:1234abcd]/views.py[/url:1234abcd]',
...     bbcode_uid=u"1234abcd"
... )
u'Look at [url=https://github.com/jedie/PyLucid/views.py]/views.py[/url]'

>>> clean_bbcode((more...)

        def clean_bbcode(text, bbcode_uid=None):
    """
    >>> clean_bbcode('DjangoBB trac page.')
    u'DjangoBB [url=http://djangobb.org/]trac[/url] page.'

    >>> clean_bbcode(
    ...     u'Look at [url=https://github.com/jedie/PyLucid/views.py:1234abcd]/views.py[/url:1234abcd]',
    ...     bbcode_uid=u"1234abcd"
    ... )
    u'Look at [url=https://github.com/jedie/PyLucid/views.py]/views.py[/url]'
    
    >>> clean_bbcode(
    ...     u"[code:1234abcd]What's &broken; hey?[/code:1234abcd]",
    ...     bbcode_uid=u"1234abcd"
    ... )
    u"[code]What's broken hey?[/code]"
    """
    text = force_unicode(text)

    if bbcode_uid is not None:
        text = text.replace(u":%s" % bbcode_uid, u"")

    text = deentity.replace_all(text)

    return phpbb_html2bbcode(text)
        


src/d/j/django-phpBB3-0.3.0/django_phpBB3/models.py   django-phpBB3(Download)
from django.utils.tzinfo import FixedOffset
 
from django_phpBB3.utils import clean_bbcode, deentity
 
 
 
        text = smart_unicode(self.sig)
        bbcode = clean_bbcode(text, bbcode_uid)
        return bbcode
 
 
        text = smart_unicode(self.text)
        bbcode = clean_bbcode(text, bbcode_uid)
        return bbcode
 

src/d/j/django-phpBB3-HEAD/django_phpBB3/models.py   django-phpBB3(Download)
from django.utils.tzinfo import FixedOffset
 
from django_phpBB3.utils import clean_bbcode, deentity
 
 
 
        text = smart_unicode(self.sig)
        bbcode = clean_bbcode(text, bbcode_uid)
        return bbcode
 
 
        text = smart_unicode(self.text)
        bbcode = clean_bbcode(text, bbcode_uid)
        return bbcode