Closed vmanthos closed 5 years ago
When there is a tag inserted between <iframe></iframe> the iframes lazyload feature breaks.
<iframe></iframe>
Doing the :
preg_match_all( '/<iframe.*\ssrc=["|\'](.+)["|\'].*(>\s*<\/iframe>)/iU', $html, $matches, PREG_SET_ORDER );
on this:
<iframe style="border: none;" src="https://snazzymaps.com/embed/12345" width="100%" height="300px"><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span></iframe>
produces this:
<iframe style="border: none;" src="about:blank" width="100%" height="300px"> <span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"> </span data-rocket-lazyload="fitvidscompatible"data-lazy-src="https://snazzymaps.com/embed/12345"> </iframe>
breaking the lazyload of the iframe.
iframe
RegEx example: https://regex101.com/r/MZg0d8/1/
Related ticket: https://secure.helpscout.net/conversation/706786800/86043?folderId=2135277
The following part was added automatically:
<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>
References
Another case: https://secure.helpscout.net/conversation/712138127/86959?folderId=2135277
Another case here: https://secure.helpscout.net/conversation/711946178/86928/?folderId=1391600 Customer said she used embed code from Google My Maps, so the extra <span> could be due to what Vasilis highlights.
<span>
When there is a tag inserted between
<iframe></iframe>
the iframes lazyload feature breaks.Doing the :
on this:
produces this:
breaking the lazyload of the
iframe
.RegEx example: https://regex101.com/r/MZg0d8/1/
Related ticket: https://secure.helpscout.net/conversation/706786800/86043?folderId=2135277
The following part was added automatically:
References