jaxon-php / jaxon-js

The Jaxon javascript library https://www.jaxon-php.org.
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

style.* unable to be assigned in 2.0.2 #9

Closed robraux closed 6 years ago

robraux commented 6 years ago

In version 2.0.1 the below functions correctly and replaces the URL with the requested value. In version 2.0.2, the removal of the eval makes it so that this no longer works.

$objResponse->assign('product_image', 'style.backgroundImage', "url('xxx')");

The issue here is that backgroundImage is represented as "background-image". The offending change appears to be here: https://github.com/jaxon-php/jaxon-js/commit/71387940d686c662054c53edfbf6ef2b1ca7044b#diff-abdeae63243603a492e65e4b89643994R1272

I suspect that other "style.*" assign examples will no longer function.