Issue 1041 in modpagespeed: HTML parser breaks Handlebars markup in an edge case with invalid html

2 views
Skip to first unread message

modpag...@googlecode.com

unread,
Jan 9, 2015, 4:21:46 PM1/9/15
to mod-pagesp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1041 by glancas...@appneta.com: HTML parser breaks Handlebars
markup in an edge case with invalid html
https://code.google.com/p/modpagespeed/issues/detail?id=1041

Handlebars.js markup such as '{{/if_eq}}' in an HTML tag gets converted
to '{{ if_eq}}' when the HTML parser treats '/' as an attribute separator
and renders it as a space.

The attached handlebars_fix.diff patch against the current trunk code fixes
the problem and hopefully doesn't break anything else.

Code was tested with Apache 2.2.22 on Ubuntu 12.04 LTS (Precise).

The attached select.html document illustrates the problem.



Attachments:
handlebars_fix.diff 892 bytes
select.html 261 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

modpag...@googlecode.com

unread,
Jan 9, 2015, 4:23:48 PM1/9/15
to mod-pagesp...@googlegroups.com

Comment #1 on issue 1041 by jmara...@google.com: HTML parser breaks
Handlebars markup in an edge case with invalid html
https://code.google.com/p/modpagespeed/issues/detail?id=1041

Thanks for the patch. What version of the PageSpeed source is this patch
against?

modpag...@googlecode.com

unread,
Jan 9, 2015, 4:40:29 PM1/9/15
to mod-pagesp...@googlegroups.com

Comment #2 on issue 1041 by jcrow...@google.com: HTML parser breaks
Handlebars markup in an edge case with invalid html
https://code.google.com/p/modpagespeed/issues/detail?id=1041

patch file says revision 4497, latest trunk.

modpag...@googlecode.com

unread,
Apr 8, 2015, 2:13:26 PM4/8/15
to mod-pagesp...@googlegroups.com

Comment #3 on issue 1041 by jcro...@google.com: HTML parser breaks
Handlebars markup in an edge case with invalid html
https://code.google.com/p/modpagespeed/issues/detail?id=1041

this issue has been migrated to github:
https://github.com/pagespeed/mod_pagespeed/issues/1041
Reply all
Reply to author
Forward
0 new messages