[MarkLogic Dev General] search:search - escaping quotes

Ryan Dew ryan.j.dew at gmail.com
Tue Mar 20 15:45:39 PDT 2012


With the default setting you shouldn't have to worry about escaping single
quotes. Search is flexible in that with the search:options element you can
pass options that modify the grammar. Unfortunately/fortunately, depending
of your view of things, the parser doesn't accommodate the use of regular
expression patterns in the grammar, so I don't think there is a simple
solution.

Your best bet may be to do your own parsing to create a cts:query and use
search:resolve. This isn't an ideal solution. When I have time I'd like to
look into it further.

-Ryan Dew


On Tue, Mar 20, 2012 at 9:03 AM, Danny Sinang <d.sinang at gmail.com> wrote:

> Hi,
>
> In search:search(), how do I escape single and double quotes entered by
> the user ?
>
> Regards,
> Danny
>
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120320/50bb3f26/attachment.html 


More information about the General mailing list