WPIntell

Source evidence

SyntaxErro with lazyload enabled

Breeze Cache · support · 2026-01-27T08:10:00+00:00

complaintsentiment
mediumseverity
0.68relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 37 rows with source links

18.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

30 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Bruno unresolved
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”)}))})) Could you please share your current Breeze settings? This would be very helpful for us in narrowing down the root cause of the issue. 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. 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. 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) 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 );

Comments

5 shown
owaisalam 2026-01-27T09:30:00+00:00

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

Bruno 2026-01-27T09:46:00+00:00

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.

owaisalam 2026-01-27T11:42:00+00:00

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.

Bruno 2026-01-28T06:49:00+00:00

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)

owaisalam 2026-01-28T13:10:00+00:00

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 );