now encodes single quote
added HtmlWriter