Don't use `extended_valid_elements`. Use this:

```python
{'valid_elements': "p,br,strong/b,em/i,sup,sub,h3,h4,h5,h6,ul,ol,li,a[!href|title|target|class],blockquote,pre,code,img[!src|alt|class|width|height|align]"}
```