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

def test_raw_editor_safety_filter(self):

    self.client.login(username='admin', password='testpass')
    rev = revision(is_approved=True, save=True, content='\n                                                <p    onload=alert(3)>FOO</p>\n                                                <svg><circle    onload=confirm(3)>HI    THERE</circle></svg>\n                                ')
    response = self.client.get(('%s?raw=true' % reverse('wiki.document', args=[rev.document.slug])), HTTP_X_REQUESTED_WITH='XMLHttpRequest')
    ok_(('<p    onload=' not in response.content))
    ok_(('<circle    onload=' not in response.content))
