fixing a bug when text conains xml entities
code for dashboard