encode / decode text for prettify pre tag