Refactor removeTrailingBr() blockelementcontenthandler.js

Move generic operation to html.js