friendica/friendica — pull request #400 by annando (2012-07-18 19:30:41+00:00)
Title: New bb2markdown, parse_url improved

This pull request contains the following improvements:

api.php: I added a "404" when an API call isn't successful. There seems to be clients that need this. Additionally I fixed a problem that the content was urldecoded unnecessarily.

bb2diaspora.php, bbcode.php, markdownify.php: I changed the converter from bbcode to markdown again :) I reenabled the way from bbcode to html and html to markdown by using the markdownify library. I changed several conversions. The html is cleaned by using domxml. So the markdownify library has no problems with lists anymore. Now there should be no problems anymore.

dba.php: I added an option to log all database calls with the execution so that you can improve the database speed.

items.php: When the title contains only parts from the body the title is removed. This is helpful when importing from tumblr. Additionally retweets now are imported like wall-to-wall posts and the body contains the original post. So it doesn't happen anymore that posts are cut through the "RT: ".

parse_url.php: I completely rewrote this part. The webpage is scanned through domxml and different methods are used like opengraph and dublin core. Images are now included. When there is no image defined through opengraph the pictures from the page are taken when they are larger than 150 pixels.

text.php: There was a bug that too much newlines were generated. That is fixed as well.