• When lazy loading is enabled in the latest version of Breeze, this error occurs. The problem can disrupt the cache if there is a combination of JS files.

    breeze_xxxxxxxxxx-1-19-inline_script_19.js?ver=1769500703:1 Uncaught SyntaxError: Unexpected token ‘&’
    window.addEventListener(“DOMContentLoaded”,(e=>{document.querySelectorAll(‘img[loading=”lazy”]’).forEach((e=>{e.getBoundingClientRect().top<=window.innerHeight&&(e.loading=”eager”)}))}))

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author owaisalam

    (@owaisalam)

    Could you please share your current Breeze settings? This would be very helpful for us in narrowing down the root cause of the issue.

    Thread Starter Bruno

    (@heeroyui)

    Basic Options

    ✔ Cache System
    ✔ Mobile Cache
    ✔ Gzip compression
    ✔ Browser cache
    ✔ Cross origin Safe links

    File Optimization

    ✔ HTML minify
    ✔ CSS minify (removes whitespace + font)
    ✔ Include inline CSS
    ✔ Combine CSS
    ✔ JS minify
    ✔ Include inline JS
    ✔ Combine JS

    Preload

    ✔ Preload Links

    Advanced options

    ✔ Disable emoji
    ✔ Host Files Locally (Google Fonts)

    The rest is not active.

    If I enable lazy loading of images (images + iframe + video + native browser), I have the problem.
    I just saw that the problem comes from the “Enable lazy loading of native browser” option. I never had this problem before with the option enabled.

    Plugin Author owaisalam

    (@owaisalam)

    Thanks for sharing the details.

    Could you please navigate to the breeze/inc/breeze-admin.php file and locate line 292?

    Kindly remove the wp_kses_post() function from that line and then check if the issue is resolved.

    Let us know the outcome so we can assist you further if needed.

    Thread Starter Bruno

    (@heeroyui)

    yes

    I no longer have the problem when I enable the “Enable lazy loading of native browser” option and delete the following line: 

    // For JavaScript code blocks, use wp_kses_post which allows safe content
    printf( '<script type="text/javascript">%s</script>', wp_kses_post( $sanitized_js ) );

    (but if the code remains, it will return in the next update)

    Plugin Author owaisalam

    (@owaisalam)

    There’s no need to remove the entire link.
    Please remove only the wp_kses_post() function and check if the issue is resolved.

    printf( '<script type="text/javascript">%s</script>', $sanitized_js );

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.