projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a8d506
)
Allow closing curly braces as part of action values as long as they are escaped
author
Fabian Keil
<fk@fabiankeil.de>
Sat, 24 Nov 2012 13:59:00 +0000
(13:59 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sat, 24 Nov 2012 13:59:00 +0000
(13:59 +0000)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index
adb2f3c
..
f089836
100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-1,4
+1,4
@@
-const char actions_rcs[] = "$Id: actions.c,v 1.8
5 2012/11/11 12:36:45
fabiankeil Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.8
6 2012/11/11 12:37:10
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/actions.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/actions.c,v $
@@
-395,7
+395,17
@@
jb_err get_action_token(char **line, char **name, char **value)
str++;
*value = str;
str++;
*value = str;
- str = strchr(str, '}');
+ /* The value ends with the first non-escaped closing curly brace */
+ while ((str = strchr(str, '}')) != NULL)
+ {
+ if (str[-1] == '\\')
+ {
+ /* Overwrite the '\' so the action doesn't see it. */
+ string_move(str-1, str);
+ continue;
+ }
+ break;
+ }
if (str == NULL)
{
/* error */
if (str == NULL)
{
/* error */