Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does mod_proxy_html mangle my Javascript?

0
Posted

Why does mod_proxy_html mangle my Javascript?

0

It doesn’t. Your javascript is simply too badly malformed, and libxml2’s error correction isn’t what you expect! Check it with a validator, or with libxml2’s xmllint –html (which uses the same parser as mod_proxy_html). Here is a fuller explanation. The best fix for this is to remove the javascript from your markup, and import it from a separate .js file. If you have an irredeemably broken publishing system, you may have to upgrade to mod_publisher or resort to a markup-blind filter such as mod_line_edit, mod_substitute or mod_sed.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.