function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deep067Deep067 

special character using sforce.connection.query in visualforce page

We have a custom field "check" of type Picklist.
If we execute query using ajax and using sforce.connection.query in the VF page using special character like

var query = Select Id, LastName, FirstName From Contact where Contact.check__c like 'sdds!&*()_+{}|:<>?/.;][%';
var result = sforce.connection.query(query);

it give an error faultstring (give an error due to parentheses, curly braces, and square braces) other wise it is working fine
In controller it is also working fine with any special character 
if we use any other field in place of "check__c" (or we can say other then picklist) then it is working fine for all the special character
can any one tell me how to execute this query properly for picklist type field(or how to handel parentheses, curly braces, and square braces for sforce.connection.query in the VF page)