replaceEntitiesValue(val){
        if(typeof val === "string" && val.length > 0){
            for(let entityName in this.docTypeEntities){
                const entity = this.docTypeEntities[entityName];
                val = val.replace( entity.regx, entity.val);
              }
              for(let entityName in this.lastEntities){
                const entity = this.lastEntities[entityName];
                val = val.replace( entity.regex, entity.val);
              }
              if(this.replaceHtmlEntities){
                for(let entityName in htmlEntities){
                  const entity = htmlEntities[entityName];
                  val = val.replace( entity.regex, entity.val);
                }
              }
            val = val.replace( ampEntity.regex, ampEntity.val);
        }
        return val;
    }
1. Replace DOCTYPE entities 
2. Replace external entities 
3. Replace HTML entities if asked
@param {string} val