jonge-democraten / hemres

Newsletters for the Jonge Democraten
MIT License
0 stars 1 forks source link

Displaying mailings with incorrect html is broken #10

Closed floort closed 9 years ago

floort commented 9 years ago

The line "result = inline_css(result)" in models.py throws a XMLSyntaxError. Lots of old mailings have broken html.

trolando commented 9 years ago

Would this be solved with a try catch block around it? That simply "pass" ignores the error for broken HTML?

Pi2048 commented 9 years ago

That would work, I think. After all, new newsletters are the only ones that use this feature. Older newsletters could just as easily pass through unprocessed.

Obviously be careful to only catch the XMLSyntaxError and not other errors.

trolando commented 9 years ago

Ok so it would look like try: result = inline_css(result) except XMLSyntaxError: pass # bad luck

trolando commented 9 years ago

Floor can you try this fix?