title: c# replace string function not returning expected results
body: <pre><code>string message = CommonFunctions.SanitiseInput(context.Request.QueryString["msg"]);
  </code></pre>
  
  <p>And the function is defined as:</p>
  
  <pre><code>// Sanitise input
  public static string SanitiseInput(string inputText)
  {
      string cleanedString = inputText;
  
      cleanedString.Replace("&lt;","&amp;lt;");      // No code
      cleanedString.Replace("&gt;", "&amp;gt;");
      cleanedString.Replace("&amp;", "&amp;amp;");    // No query string breaks
  
      return cleanedString;
  }
  </code></pre>
  
  <p>Given input <code>"&lt;b&gt;rg&lt;/b&gt;"</code> this returns the same, and not <code>"&amp;lt;b&amp;gt;rg&amp;lt;/b&amp;gt;"</code></p>