projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Encode special characters in term
[yaz-moved-to-github.git]
/
src
/
rpn2solr.c
diff --git
a/src/rpn2solr.c
b/src/rpn2solr.c
index
11abe87
..
70b2f6c
100644
(file)
--- a/
src/rpn2solr.c
+++ b/
src/rpn2solr.c
@@
-254,9
+254,9
@@
static int rpn2solr_simple(solr_transform_t ct,
/* Bug 2878: Check and add Truncation */
if (checkForLeftTruncation(apt->attributes))
wrbuf_puts(w, "*");
/* Bug 2878: Check and add Truncation */
if (checkForLeftTruncation(apt->attributes))
wrbuf_puts(w, "*");
- /* BUG 4415: Escape : (as \:) in string terms */
for (i = 0 ; i < lterm; i++) {
for (i = 0 ; i < lterm; i++) {
- if (sterm[i] == ':') {
+ /* BUG 4415: Escape special characters in string terms */
+ if (strchr("+-&|!(){}[]^\"~*?:\\", sterm[i])) {
wrbuf_putc(w, '\\');
}
wrbuf_putc(w, sterm[i]);
wrbuf_putc(w, '\\');
}
wrbuf_putc(w, sterm[i]);