Skip to content

Commit

Permalink
Merge pull request #182 from grossir/fix_html_decoding_errors
Browse files Browse the repository at this point in the history
fix(tasks.extract_from_html): Catch UnicodeDecodeError
  • Loading branch information
flooie authored Feb 27, 2024
2 parents b3cc4d7 + b94524e commit c293ea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctor/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def extract_from_html(path):
content = get_clean_body_content(content)
content = force_text(content, encoding=encoding)
return content, "", 0
except DoctorUnicodeDecodeError:
except (UnicodeDecodeError, DoctorUnicodeDecodeError):
pass
# Fell through, therefore unable to decode the string.
return "", "Could not encode content properly", 1
Expand Down

0 comments on commit c293ea6

Please sign in to comment.