code: function escapeAttribute(value) {
      return value.replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
  }
docs: Escapes characters that can not be in an XML attribute.