ckan / ckanext-pages

A simple builtin CMS for CKAN sites
GNU General Public License v3.0
51 stars 99 forks source link

Remove extraneous tags added by lxml that prevent proper rendering #88

Closed amercader closed 5 years ago

amercader commented 5 years ago

If lxml is enabled, the _inject_views_into_page method of the controller does some tweaking of the HTML tree. If the content passed is a text snippet (like 99.99% of the markdown content passed) it will wrap it on <p> tags (or if the snippet starts with a <p> tag, with a <div> tag). This will cause the snippet to not be properly rendered.