Check the updated test case for wrapping an image in link. Without this patch it's not possible to escape the link attributes but prevent the image tag from being escaped. So regardless of the implications this is a necessary option imo.