fix bug in htmlparase.convert and add link density calculation