Please sign in to comment.
Add NULL check after native call to __html__ method
If the method raises an exception, PyObject_CallObject() returns NULL, but the code didn't check for that, which led to a segfault. Fixes #108
- Loading branch information...
Showing with 24 additions and 0 deletions.
|@@ -0,0 +1,21 @@|
|# -*- coding: utf-8 -*-|
|from markupsafe import escape|
|"""Checks whether exceptions in custom __html__ implementations are|
|There was a bug in the native implementation at some point:|
|obj = CustomHtmlThatRaises()|