function unescapeEntities(s) {
    return s.replace(ENTITY_RE_1, decodeOneEntity);
  }
The plain text of a chunk of HTML CDATA which possibly containing.

{\@updoc
$ unescapeEntities('')
# ''
$ unescapeEntities('hello World!')
# 'hello World!'
$ unescapeEntities('1 &lt; 2 &amp;&AMP; 4 &gt; 3&#10;')
# '1 < 2 && 4 > 3\n'
$ unescapeEntities('&lt;&lt <- unfinished entity&gt;')
# '<&lt <- unfinished entity>'
$ unescapeEntities('/foo?bar=baz&copy=true')  // & often unescaped in URLS
# '/foo?bar=baz&copy=true'
$ unescapeEntities('pi=&pi;&#x3c0;, Pi=&Pi;\u03A0') // FIXME: known failure
# 'pi=\u03C0\u03c0, Pi=\u03A0\u03A0'
}

@param {string} s a chunk of HTML CDATA.  It must not start or end inside
    an HTML entity.