Uncaught SyntaxError: Invalid Unicode escape sequence \u

23 Views Asked by At

I have a JSP which is used to display location in UI form where JSTL code is been used,

function setLocation() {
      var fullPath = "${fn:escapeXml(folderPath)}";
      updateFolderPath(fullPath);
    
  }

the folderPath value is "university_stores\university" which is coming from form, but fn:escapeXml is failing and giving "Uncaught SyntaxError: Invalid Unicode escape sequence" as fullPath is becoming "university_stores\university" after the escapeXml function is executed and jsp gets loaded to UI

Can someone help me to fix this issue or is there any ulternate I can use for escapeXml, I tried splitting the string and concating again but didnt worked

0

There are 0 best solutions below