drush cron --debug

I see the following:

WD Feeds: exception 'Exception' with message 'Invalid enclosure
https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCc3_Nk7ZztLNc3&w=13...'

characters are written incorrectly for example "&" instead of "&"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

COBadger’s picture

Status: Active » Needs review
FileSize
997 bytes

We experienced this issue and believe it to be caused by Facebook returning an image that does not live within Facebook through an image utility ('safe_image.php'.)

We added logic to parse the Facebook $entry->full_image, determine if this entry features an image being rendered through safe_image.php and extract the original image's URL, which we substituted back for $entry->full_image.

It may be that this approach loses image sanitizing provided by Facebook's safe_image.php utility, but in our case we're pulling Facebook posts from our own account and we're not worried about malicious images.

Patch attached.