Add test to confirm control characters are removed from shared strings

* Commit f8ef8eb78eb4556676b5770c82493e6e6edf7ec8 fixed the shared
  strings class to automatically sanitize its serialized XML output to
  remove any control characters. However, this commit did not include
  tests that the shared strings actually removed the control
  characters when serializing to an XML string.
  * This tests confirms that the string with control characters is
    added to the shared strings, and that the control characters are
    removed from the string in question when serialized to XML.