yireo / Yireo_NextGenImages

44 stars 26 forks source link

Supporting attributes which contains JSON data #77

Open dev-waltr opened 2 months ago

dev-waltr commented 2 months ago

With the changes from version 0.5.0 to version 0.5.1 it is not possible to have attributes which contains JSON-data like data-mage-init="{"Magento_Theme/js/imageMagnifier": {}}".

The nodeValue will strip everything after the initial curly braces which results in invalid html. By executing data-mage-init, which contains invalid JSON-data, it results into a JS error which breaks the frontend.

jissereitsma commented 1 month ago

Thanks for noticing. I think this is a simple change: https://github.com/yireo/Yireo_NextGenImages/commit/7a132a1faa1c9eb79205583d13043f7025bf5fe6 This will be included in version 0.5.3 that is out either today or tomorrow.