escape entity name

Escape the entity_class otherwise if the entity start with n it will become \n and becomes a new line and then the routers will not work anymore.