Made the entity regex pattern ignore character references for BZ#987252 - INVALID_CHARACTER_ER is not shown when XML editing but only provided in docbuilder error.