MW

html2text.php 1.1

Update: Use Markdownify, it’s the successor to html2text.

I changed my html2text.php function and it now supports non markdownable elements better. Previously something like <p class="foobar">...</p> would have resulted in <p>...</p>. Now these elements (which could be ported to markdown) will be left in plain html.

Additionally I made some changes which should lead to an improved performance.

Download

Get it while it’s hot: html2text.php 1.1 (.tar.gz ~ 120.9 KB)

Known Bugs

Yes, there are some, which I’ll try to fix in the next days (note: to better point out the bugs I just write what happens if you convert html to markdown to html):

Will result in:

```
<ul> <li>abc <li class="foo">bar</li></li> </ul> ```

For more information read the bottom of the html2text.php site

Comments

Want to comment? Send me an email!

Published on July 23, 2006.