Closed (won't fix)
Project:
Markdown
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Feb 2009 at 02:34 UTC
Updated:
18 May 2012 at 11:14 UTC
Whether I arrange the "HTML filter" after or before the "markdown" filter, when I use them both in the same input format my "empty lines" (as described in the markdown syntax) are not rendered as <p> tags.
I'm using the Aquia Drupal installation right out of the box, with a Zen theme. (for whatever it's worth).
Thanks,
M.M.
Comments
Comment #1
bdsl commentedI had this problem as well, installing markdown into an existing Drupal installation.
The fix seems to be to add
<p>to the list of allowed tags in the settings for the html filter. I think this could probably be explained more clearly in the readme file for markdown. Not sure why<p>isn't allowed by default.My html filter config within the markdown input filter is set to allow these tags, which seems to cover most of what markdown uses:
<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <img> <h2> <h3> <h4> <h5> <h6> <hr> <blockquote>Disappointing that Aquia haven't done that, or hadn't last Feburary. Anyone know if this is still a problem in Aquia? And anyone want to amend the markdown readme? I could do it, potentially.
Comment #2
justin2pin commentedThis isn't really a bug, but is in fact a side-effect related to the way those two filters are interacting. Make sure you set Markdown's weight *higher* than the HTML filter when configuring the input format. That way, the disallowed tag won't have even been created yet (by Markdown) when HTML filter removes tags not included in the allowed tags list.
Comment #3
darrenmothersele commentedI found this issue while looking for a list of tags that Markdown produces so I could filter on that. I know the issue is closed, but I wanted to correct this advice because I think it constitutes a security flaw.
You should put Markdown before the HTML filter - that way you still filter the HTML to remove any dodgy stuff you don't want. That's what I'm doing, filtering on the tags as given in comment 1 above. Except removing the img tag as that's a security issue.