zulip/zerver/lib/url_preview/parsers
Alex Vandiver ad8943a64a url_preview: Only extract img tags with an `src`.
Some `<img>` tags do not have an SRC, if they are rewritten using JS
to have one later.  Attempting to access `first_image['src']` on these
will raise an exception, as they have no such attribute.

Only look for images which have a defined `src` attribute on them.  We
could instead check if `first_image.has_attr('src')`, but this seems
only likely to produce fewer valid images.
2020-08-18 14:26:21 -04:00
..
__init__.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
base.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
generic.py url_preview: Only extract img tags with an `src`. 2020-08-18 14:26:21 -04:00
open_graph.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00