Update density.js

Some lines in _htmlToText was useless. this one in more optimized