more defensive code when searching for thumbnails in post content