flying_scripts_rewrite_html fix
-
Hello,
thank you for this great plugin!
There are some rare cases when
w3tc_process_content
is triggered multiple times and then functionflying_scripts_rewrite_html
will putsrc
todata-src
and then it will removesrc
, so when it will run for the second time, then it will again replacedata-src
this time with<script>
innerHTML that is ofc empty, so it will result indata:text/javascript;base64,
Easy fix is just wrap this condition part
if ($script->getAttribute("src")) { ... } else { ... }
fromflying_scripts_rewrite_html
function into another condition checking if there is alreadydata-src
, eg.if (!$script->getAttribute("data-src")){ ... }
Can you please implement this fix ASAP?
Thank you very much.
- The topic ‘flying_scripts_rewrite_html fix’ is closed to new replies.