title: Javascript passed string with \r in the string is being interpreted to newline
body: <p>I am receiving a new string like so "ABCD\richard"</p>
  
  <p>I want to be able to strip off "ABCD\" off of the string. However JavaScript is interpreting the  "\r" as a new line metacharacters. I imagine I will have the same issues with any metacharacters. I am looking for a way to strip the string of "ABCD\" on all strings passed.</p>
  
  <p>The end result should be "richard" as the final string. This is what I have tried so far:</p>
  
  <p>string.substr(5,100);
  string.split('ABCD\');</p>
  
  <p>Here is my code:</p>
  
  <pre><code>function export_sal(user)
  {
      var noABCD = user.replace(/ABCD\\/, '');
      console.log(noABCD);
  }
  </code></pre>
  
  <p>This is the HTML:</p>
  
  <pre><code>&lt;div class="pull-left" style="padding-bottom:5px;padding-left:5px;"&gt;
      &lt;div onclick="export_sal('&lt;?php echo $_SERVER['AUTH_USER'];?&gt;');" class='btn btn-info btn-md' id="e_sal"&gt;SAL Export
  </code></pre>
  
  <p>
          </p>
  
  <p>the result of the console output is like this:</p>
  
  <p>ABCD
  ichard</p>
  
  <p>I need the console.log output to show: richard</p>
  
  <p>I appreciate the help. Thank you.</p>