function escapeQuotes(string) {
  let newString = string.toString();

  newString = newString
    .replace(/["]/g, '&quot;')
    .replace(/[']/g, '&#39;');

  return newString;
}
Escapes the quotation marks in the `string` for use in HTML and URL.
@param {string} string