truncatechars_html

For ticket #19496 and should now fix the issue of 
>>> truncatechars_html('<h1>test</h1>', 5)
u'<h1>t ...</h1>'

Also fixed truncatechars as this had become broken in the original version