[ 
https://issues.apache.org/jira/browse/USERGRID-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15939893#comment-15939893
 ] 

Michael Russo commented on USERGRID-1041:
-----------------------------------------

Fixed by allowing a backslash to escape.  In fact, the query parser handled 
this correctly, but later in the execution the escaping backslash was left in 
the literal string when querying the index.  Fixed that issue as part of this 
commit:

https://github.com/apache/usergrid/commit/89178326debbd82660f9f2691b3b8cf06d847d4a

Queries with single quotes in the value will now look like the following and 
correctly find the value:

{code}?ql=select * where title='Charlotte\'s Web'{code} 


> Implement means of escaping single-quote characters in ql
> ---------------------------------------------------------
>
>                 Key: USERGRID-1041
>                 URL: https://issues.apache.org/jira/browse/USERGRID-1041
>             Project: Usergrid
>          Issue Type: Improvement
>    Affects Versions: 2.1.0
>            Reporter: Brandon Shelley
>            Assignee: Michael Russo
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Given the entity:
> {code}{
>     "title": "Charlotte's Web"
> }{code}
> These queries do not return any results:
> {code}?ql=select * where title='Charlotte's Web'
> ?ql=select * where title='Charlotte%27s Web'{code}
> We should support a means of escaping ' characters in text. Possible 
> solutions:
> - Using a backslash to denote escaped quotes
> - Support alternative delimiters in the query
> - Decode hex % encoded characters (but then what do we do for string 
> literals?)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to