ezsystems/ezpublish-kernel — pull request #1059 by pspanja (2014-10-30 12:12:24+00:00)
Title: Fix EZP-23523: Remove an embed image will cause fatal error when displaying content

This PR resolves issue https://jira.ez.no/browse/EZP-23523

The problem is solved by catching `NotFoundException` and logging an error.
This does not implement cleanup (FWIW not done by Legacy Stack either), which will be handled in a follow-up: https://jira.ez.no/browse/EZP-23540

Additionally to logging an error, `embed` element is removed from document. This handles temporary paragraphs, empty paragraphs and empty links. Embed as a child of a link was reported in https://jira.ez.no/browse/EZP-23513. When this issue is fixed by implementing pre-converter pass that will handle expansion of paragraph, the removal logic will be simplified.

Testing: unit tests.