Opened 5 years ago

Last modified 4 years ago

#609 new enhancement

Apply xslt-html-parser patch to http_xslt_module (used by Diazo)

Reported by: Owned by:
Priority: minor Milestone:
Component: nginx-module Version: 1.6.x
Keywords: http_xslt_module, xslt-html-parser Cc: christopher@…
uname -a: Linux 2.6.32-531.17.1.lve1.2.60.el6.x86_64 #1 SMP Tue Jul 8 11:25:32 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.6.1 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) TLS SNI support enabled configure arguments: --with-http_xslt_module --with-http_stub_status_module --add-module=/home/chris2fr/hacks/nginx_accept_language_module-master --with-ipv6 --with-http_ssl_module --with-cc-opt=-Wno-error --prefix=/home/chris2fr/opt/nginxslt



Please integrate the xslt-html-parser patch to the http_xslt_module. This is a feature notably used by Diazo ( Here is the patch:

The patch applies to src/http/modules/ngx_http_xslt_filter_module.c. My patch was patch src/http/modules/ngx_http_xslt_filter_module.c nginx-xslt-html-parser.patch.

Here is a blog where I described what I did to get this working:

I just read the patch, and it seems OK. It adds a htmlFreeParserCtxt if the module is html and not xml. My guess is that would get the parser to XSLT work even if not quite well-formed, but well-enough formed (the goal of the html parse I guess).

Change History (1)

comment:1 Changed 4 years ago by davidjb@…

I'm the author of the patch linked above (well, re-authored it and updated it for a modern version of Nginx from originally).

Having this integrated into Nginx core would allow the XSLT filter module to apply to HTML documents, and the patch makes the configuration of XSLT opt-in for compatibility.

I'm yet to experience any issues with the patch (currently with Nginx 1.8.0 and about to test 1.9.x, which the patch seems to still cleanly apply to).

Note: See TracTickets for help on using tickets.