GitHub Issue #62: html-encode input text when calculating width