add html encoding helper method