chriso/validator.js — pull request #313 by aichholzer (2014-09-07 19:11:23+00:00)
Title: Encode single quote into &#x27; instead of &apos;

' does not appear in HTML.
http://www.w3.org/TR/xhtml1/#C_16

My browser, for example, latest Chrome does not understand `'` and renders the text as is. I have not tested on other browsers but, in any case, this small change will make the escaped entity work on pretty much every browser.