Fixed the bugs found when testing BZ#1019050 - RFE: Replace entities with those defined in a content spec in the live renderer.