Bugs item #474556, was opened at 2001-10-24 10:25
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=474556&group_id=3152

Category: API: Tcl
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Brady Wetherington (camusatan)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_dbquotevalue doesn't escape backslash

Initial Comment:
Data with a literal backslash that is submitted to
ns_dbquotevalue will get mangled by insertion into the
database - I found this out when I tried to insert some
C source code with the text '\0' in it, which needed to
be quoted into \0. The following should be added to
nsdb.tcl.

In ns_dbquotevalue, right after the 'regsub' line, add
another:

regsub -all {\B} $value "\\\\" value

Unfortunately, yes, that is indeed eight backslashes.
There's probably a way to do it with four \B's instead
- or maybe two. The above is what I did to make it work
for me.

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=474556&group_id=3152

Reply via email to