We're seeing some unexpected behavior when attempting to proxy hyperlink tags
and was wondering if anyone recognized this behavior as an existing issue or
due to something else. The behavior always occurs when a hyperlink tag becomes
associated in a parent child (or vice versa) relationship with a table. After
running through proxy, the resultant HTML always moves the child nodes of the
hyperlink up to be a sibling of the hyperlink instead of remaining children.
E.g. <a><table/></a> becomes <a></a><table/> Example appears below, although
other flavors exist such as a hyperlink within a table <a>text here</a>
becoming <a></a>text here. Our httpd configuration includes libxml2,
mod_proxy_html, and mod_xml2enc for proxying. The entire additional conf file
follows the HTML example below.
The behavior occurs as long as ProxyHTMLEnable is on but regardless of whether
or not there are ProxyHTMLLinks found that match anything in proxy-html.conf.
At least one mapping must remain present in order to cause the behavior. E.g.
comment out all but "ProxyHTMLLinks form action" and the following example will
continue to exhibit the behavior.
Hyperlink tags not associated with a table are handled as expected. When
configuring such that hyperlink href attributes should be rewritten results in
proper rewrites of the attribute but the node movement behavior still persists.
Any insight is much appreciated.
<!DOCTYPE html>
<html>
<head>
<title>testing mod_proxy_html</title>
</head>
<body>
<a href="http://www.msn.com">
<table>
<tr>
<td>table wrapped by <a></td>
</tr>
</table>
</a>
</body>
</html>
---
LoadFile /usr/lib/libxml2.so
LoadModule proxy_html_module lib/apache/mod_proxy_html.so
LoadModule xml2enc_module lib/apache/mod_xml2enc.so
ProxyRequests off
Include /etc/httpd/conf/extra/proxy-html.conf
ProxyPass /proxytest http://172.20.0.15/test.html
ProxyHTMLURLMap http://172.20.0.15/test.html /proxytest
<Location /proxytest/>
ProxyHTMLEnable On
</Location>