diff --git a/lib/core/common.py b/lib/core/common.py index cbf92ccce..245763b9b 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3337,6 +3337,8 @@ def findPageForms(content, url, raise_=False, addToTargets=False): try: forms = ParseResponse(response, backwards_compat=False) + except UnicodeError: + pass except ParseError: warnMsg = "badly formed HTML at the given URL ('%s'). Going to filter it" % url logger.warning(warnMsg) diff --git a/thirdparty/clientform/clientform.py b/thirdparty/clientform/clientform.py index 0169c5aaf..3ac1534f5 100644 --- a/thirdparty/clientform/clientform.py +++ b/thirdparty/clientform/clientform.py @@ -1124,6 +1124,7 @@ def _ParseFileEx(file, base_uri, if action is None: action = base_uri else: + action = unicode(action, "utf8") if action and not isinstance(action, unicode) else action action = _urljoin(base_uri, action) # would be nice to make HTMLForm class (form builder) pluggable form = HTMLForm(