| Index: ios/chrome/browser/reading_list/url_downloader.cc
|
| diff --git a/ios/chrome/browser/reading_list/url_downloader.cc b/ios/chrome/browser/reading_list/url_downloader.cc
|
| index eea31e57c0f468b03934a84e8ed29b931664be3f..b73616bcc1e8a1187e46e655922139f960e9d0cd 100644
|
| --- a/ios/chrome/browser/reading_list/url_downloader.cc
|
| +++ b/ios/chrome/browser/reading_list/url_downloader.cc
|
| @@ -333,8 +333,9 @@ std::string URLDownloader::SaveAndReplaceImagesInHTML(
|
| // Mixed content is HTTP images on HTTPS pages.
|
| bool image_is_mixed_content = distilled_url_.SchemeIsCryptographic() &&
|
| !images[i].url.SchemeIsCryptographic();
|
| - // Only save images if it is not mixed content.
|
| - if (!image_is_mixed_content) {
|
| + // Only save images if it is not mixed content and image data is valid.
|
| + if (!image_is_mixed_content && images[i].url.is_valid() &&
|
| + !images[i].data.empty()) {
|
| if (!SaveImage(url, images[i].url, images[i].data, &local_image_name)) {
|
| return std::string();
|
| }
|
|
|