'Safety filter should be applied before rendering editor
bug 821986'

def test_editor_safety_filter(self):

    self.client.login(username='admin', password='testpass')
    r = revision(save=True, content='\n                                                <svg><circle    onload=confirm(3)>\n                                ')
    args = [r.document.slug]
    urls = (reverse('wiki.edit', args=args), ('%s?tolocale=%s' % (reverse('wiki.translate', args=args), 'fr')))
    for url in urls:
        page = pq(self.client.get(url).content)
        editor_src = page.find('#id_content').text()
        ok_(('onload' not in editor_src))
