<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def link(self, content, raw_url, title=''):
 """ Filters links. """

        if self.check_url(raw_url):
            url = self.rewrite_url(raw_url)
            maybe_title = ' title="%s"' % escape_html(title) if title else ''
            url = escape_html(url)
            return ('<a href="%s"%s>' % (url, maybe_title))  + content + '</a>'
        else:
            return escape_html("[%s](%s)" % (content, raw_url))