string &escapeBasicHTML (string &str)
{
  return str.replace ("&",  "&amp;" )
            .replace ("<",  "&lt;"  )
            .replace (">",  "&gt;"  )
            .replace ("\"", "&quot;")
            .replace ("\'", "&apos;");
}
