better csv export

The URL is added. The type of items is now the name and not the ID.
Added also some htmlspecialchars_decode functions to deal with &#39 and
such.