Add missing HTML enities like ndash back and remove some trailing whitespace.