1

I am trying to filter the special keyword value from SharePoint list. Filter query doesn't work when filter the value.

I am applying the encodeURIComponent solution for encode the special keyword. But special keyword value doesn't encode(Screenshot attached).

enter image description here

Please suggest how to filter special keyword value.

4
  • Which special keywords you are getting in the RequestID?
    – Harsh
    Mar 31 at 7:18
  • I am getting below special keyword in RequestID:- '&', ',', '-', '%'.
    – Shreya
    Mar 31 at 7:36
  • Can you paste the value of encodeURIVal variable also?
    – Harsh
    Mar 31 at 10:38
  • I am checking to see how things are going there on this issue. Apr 6 at 5:41

1 Answer 1

1

Generally , SharePoint API doesn't support special keywords such as #$$#@^& in the url as a parameter

EncodeURIComponent function will not encode all the special characters

You can try below code for encoding special characters:

function fixedEncodeURIComponent(src) {  
    return encodeURIComponent(src).replace(/[']/g, function (c) {  
    return '%' + c.charCodeAt(0).toString(16) + '%' + 
   c.charCodeAt(0).toString(16);  
  });  
 }  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.