I am working on a site,
http://gempact.com, that stores information on RubyGems and a lot of the gem descriptions, which I am storing as a property, contain special characters that of course need to be escaped in cypher.
which suggested I use:
gsub( /([\+\-\&\|\!\(\)\{\}\[\]\^\"\~\*\?\:\\])/ , "\\\1" )
Which almost worked, but I had to change "\\\1" to "\\\\\\1" for reasons related to multiple levels of escaping that I don't fully understand.
I have two questions. First, should I correct the wiki page where I found the regex substitution? I can't find anywhere that page is linked from, so I wasn't sure if it is the current documentation or not.
My next question is whether or not I should really be having to do this?
It seem to me that working with other libraries like activerecord, if I set a property on a model to a value, the ORM library should do whatever is necessary in the way of escaping, etc. to save that value as given.
Am I wrong about that? Would a pull request along those lines be accepted?