PHP Markdown 1.0.1b / PHP SmartyPants 1.5.1d

Following my previous weblog entry, here is the new version of PHP Markdown that should correct multiple problems visible on the previous PHP Markdown as a WordPress plugin.

The biggest change in this new version is a complete rewrite of the WordPress integration code. It is also now possible to deactivate Markdown in the comments of a WordPress weblog. Some syntax bug have also been fixed. The complete version history is available on the Markdown web page.

Finally, a problem with the _TokenizeHTML function was present in both PHP Markdown and PHP SmartyPants. In SmartyPants, that bug caused document type definitions (DOCTYPE) to be ignored and quote characters inside were changed to curly ones. PHP SmartyPants do not longer corrupt this kind of tag:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

See the PHP Markdown and PHP SmartyPants web pages for a download link.


Comments

Flo

I created a small button for PHPMarkdown, feel free to use it to advertise this great script :)

PHP Markdown

Derik

Hey Michael, I think I may have found a bug. I can’t reproduce it with Gruber’s Markdown Dingus or your PHP Markdown Dingus though. It may be particular to WordPress. It seems to affect nested quotes. It evens seems to cause a problem when you use nested blockquotes with pure XHTML (so it may be a Wordpress problem alone basically unrelated to PHP Markdown). Take a look at this reduction.

Thanks for the great software.

Michel Fortin

I found Derik’s bug. The “balanceTags” filter in WordPress does not handle nested blockquotes. That is a shame for something supposed to “correct bad html.”

Fortunately, you can “fix” this yourself by unchecking the “WordPress should correct invalidly nested XHTML automatically” in Option > Writing.

I’ve filled a bug in WordPress bug tracker about this.

Michel Fortin

Actually, I haven’t actually posted the bug report as I just found this one. From what I can see, there is already a fix for this.

Derik

Thanks Michel! You pinned it down exactly.


  • © 2003–2017 Michel Fortin.