Added html entity encoding