Sorry this doesn't solve your problem but it might be useful.
Apache's mod_proxy_html rewrites your html and strips any attributes it doesn't recognize. For example,
<p style="color:white;" test="test"></p>
translates into
<p style="color:white;"></p>
after it passes through the reverse proxy. The reverse proxy also adds a DOCTYPE, and wraps the content in html and body tags, if not present.
I haven't found a way to avoid this except for turning off the html rewriting on that file/folder. I did this to turn it off for just the pages it was breaking, and used relative links in those pages:
<Location /path/to/badly/rewriten/stuff/>
SetOutputFilter none
</Location>
If there is a better way to do this, I'd like to know too!