Removing escape character

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ikerosoft
    New Member
    • Jan 2010
    • 1

    Removing escape character

    I'm pulling the server variable LOGON_USER and it returns a value of "DOMAIN\use rid" ... which is great, however completely useless if i want to use that value in javascript.

    I could get the value of "DOMAIN\ral ph" at which point the \r becomes a carriage return and i get:

    DOMAIN
    alph

    Is there any way in javascript to remove the "\" in a string?

    Any help would be great!
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Is there any way in javascript to remove the "\" in a string?
    no, you have to escape that before passing it to JavaScript. or use a forward slash.

    Comment

    Working...