Sorry the last sentence should read:
Instead of greater than sign (>), WP Markdown outputs >
(in case WordPress.org eats this, there is an “amp” HTML entity) which is displayed as >
in the browser. Any hint on how to fix this?
Sorry I’ve noticed that this forum screwed my original post in one more way, there should be “gt” entities in the output example, not PHP arrows.
Again – I’ve tested this and it works fine form. Chances are that the root cause is also the cause of your other bug report.
Same advice as before I’m afraid. On a fresh install of WordPress with TwentyEleven theme there is no issue. It’s a pain but if you deactivate your theme and plug-ins and re-activate theme one by one until the problem reoccurs that will identify the culprit.
Maybe could you suggest a hook / action I should look for in other plugins to see if something interferes with WP-Markdown?
Borekb
Apologies. I did a few more tests – the problem is because logged out users cannot post html, and this is usually stripped out with wp_kses
, which, in this instance, runs when a comment is saved. The Markdown parser is hooked onto the same filter, but is running after wp_kses
as stripped out any html (like the >). Changing the priority so that the Markdown is parsed first solves the problem, and the other related bug report.
I shall update plug-in at some point, but if you wish to fix it yourself in the meantime, line 67 of the wp-markdown.php
should read:
add_filter('pre_comment_content',array($this,'pre_comment_content'),5);
(note the 5)
Hi. I don’t know if this is a related issue or not, but I’m also having trouble with the greater and less than characters in posts.
I tend to write my posts in a markdown text editor, then paste into WordPress when I’m done.
Here are steps to reproduce my issue:
1. Paste markdown into the WordPress post editor (where Markdown contains greater-than and less-than characters written in HTML entity form).
2. Click on ‘Save draft’. Notice that all my greater-than and less-than HTML entities have been replaced with a real greater-than or less-than symbol, which then stops them from rendering when I do a preview.
Other than this issue – well done on an awesome plugin though! Very very useful! 🙂
The > and < symbols display correctly for me. If you want to display, and not render HTML, then you can enclose it in backtics, or put it on a separate line and indent by 4 or more spaces.