53
rated 0 times
[
60]
[
7]
/ answers: 1 / hits: 24363
/ 11 Years ago, mon, april 8, 2013, 12:00:00
to start off, I don't do much JavaScript and am a complete newbie at it, now that's out of the way.. I've got a slight problem I'm trying to escape quotes from users inputs in my search app:
function getQString()
{
var query_str = 'q=' + $('input[name=q]').val().trim();
return query_str;
}
This is done as a method within a gsp file, is there something equivalent to .escape() in JavaScript?
This query is later sent to elastic search and gives me hell due to the quotes especially input like ab..
I'm using ES 0.20.6
More From » search