function unescape(local) {
  if (local === null) {
    return null;
  }

  return local
    .replaceAll(String.raw`\20`, " ")
    .replaceAll(String.raw`\22`, '"')
    .replaceAll(String.raw`\26`, "&")
    .replaceAll(String.raw`\27`, "'")
    .replaceAll(String.raw`\2f`, "/")
    .replaceAll(String.raw`\3a`, ":")
    .replaceAll(String.raw`\3c`, "<")
    .replaceAll(String.raw`\3e`, ">")
    .replaceAll(String.raw`\40`, "@")
    .replaceAll(String.raw`\5c`, "\\");
}
Unescape a local part of a JID.

@see http://xmpp.org/extensions/xep-0106.html
@param String local local part of a jid
@return unescaped local part