• Resolved zyphlar

    (@zyphlar)


    In the WP Download Manager Extended Short-Codes plugin, line 323 of the main php file, is the following code:

    jQuery('#wpdm-modal-body').html('<i
    class="icon"><img align="left" style="margin-top: -1px" src="<?php echo plugins_url('/download-manager/assets/images/loading-new.gif'); ?>" /></i>&nbsp;Please Wait...');

    Breeze replaces that code to the following:

    jQuery('#wpdm-modal-body').html('<i class="icon"><img class="br-lazy" src="data:image/svg+xml;utf8,%3Csvg%20xmlns='https://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-breeze="https://www.example.com/wp-content/plugins/download-manager/assets/images/loading-new.gif" align="left" style="margin-top: -1px"  /></i>&nbsp;Please Wait...');

    Unfortunately that causes the following Javascript error due to the unescaped apostrophes in the SVG XML:

    Uncaught SyntaxError: missing ) after argument list

    Improved logic to escape apostrophes, or always use quotes even if they’re escaped, or use another inline image format, would probably improve Breeze’s compatibility with various other plugins and themes.

Viewing 1 replies (of 1 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    Basically Lazy Load option using the WordPress ecosystem. The images are replace by a dummy transparent image as placeholder and when it reaches the screen, the original image is loaded. The code recognizes the data-sizes and data-srcset attributes used for displaying the correct image size based on the resolution.

Viewing 1 replies (of 1 total)
  • The topic ‘Lazy image conflict with WPDM Extended Shortcodes’ is closed to new replies.