* Purpose : Declares functions to work with actions files
*
* Copyright : Written by and Copyright (C) 2001-2016 the
- * Privoxy team. http://www.privoxy.org/
+ * Privoxy team. https://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
return JB_ERR_PARSE;
}
}
+#ifdef FEATURE_EXTENDED_STATISTICS
+ if (0 == strcmpic(action->name, "+block"))
+ {
+ register_block_reason_for_statistics(value);
+ }
+#endif
/* FIXME: should validate option string here */
freez (cur_action->string[action->index]);
cur_action->string[action->index] = strdup(value);
}
/* and check if one of the tag patterns matches the tag, */
- if (0 == regexec(b->url->pattern.tag_regex, tag, 0, NULL, 0))
+ if (regex_matches(b->url->pattern.tag_regex, tag))
{
/* if it does, update the action bit map, */
if (merge_current_action(csp->action, b->action))
}
for (tag = csp->tags->first; NULL != tag; tag = tag->next)
{
- if (0 == regexec(b->url->pattern.tag_regex, tag->str, 0, NULL, 0))
+ if (regex_matches(b->url->pattern.tag_regex, tag->str))
{
/*
* The pattern matches at least one tag, thus the action
return "client-header tagger";
case FT_SERVER_HEADER_TAGGER:
return "server-header tagger";
+ case FT_SUPPRESS_TAG:
+ return "suppress tag filter";
+ case FT_CLIENT_BODY_FILTER:
+ return "client body filter";
+ case FT_CLIENT_BODY_TAGGER:
+ return "client body tagger";
+ case FT_ADD_HEADER:
+ return "add-header action";
#ifdef FEATURE_EXTERNAL_FILTERS
case FT_EXTERNAL_CONTENT_FILTER:
return "external content filter";
{ACTION_MULTI_CLIENT_HEADER_FILTER, FT_CLIENT_HEADER_FILTER},
{ACTION_MULTI_SERVER_HEADER_FILTER, FT_SERVER_HEADER_FILTER},
{ACTION_MULTI_CLIENT_HEADER_TAGGER, FT_CLIENT_HEADER_TAGGER},
- {ACTION_MULTI_SERVER_HEADER_TAGGER, FT_SERVER_HEADER_TAGGER}
+ {ACTION_MULTI_SERVER_HEADER_TAGGER, FT_SERVER_HEADER_TAGGER},
+ {ACTION_MULTI_CLIENT_BODY_FILTER, FT_CLIENT_BODY_FILTER}
};
int errors = 0;
int i;
*
* Function : load_one_actions_file
*
- * Description : Read and parse a action file and add to files
+ * Description : Read and parse an action file and add to files
* list.
*
* Parameters :
*
* Function : actions_to_text
*
- * Description : Converts a actionsfile entry from the internal
+ * Description : Converts an actionsfile entry from the internal
* structure into a text line. The output is split
* into one line for each action with line continuation.
*
*
* Function : actions_to_html
*
- * Description : Converts a actionsfile entry from numeric form
+ * Description : Converts an actionsfile entry from numeric form
* ("mask" and "add") to a <br>-separated HTML string
* in which each action is linked to its chapter in
* the user manual.
*
* Function : current_actions_to_html
*
- * Description : Converts a curren action spec to a <br> separated HTML
+ * Description : Converts a current action spec to a <br> separated HTML
* text in which each action is linked to its chapter in
* the user manual.
*
*
* Function : action_to_line_of_text
*
- * Description : Converts a action spec to a single text line
+ * Description : Converts an action spec to a single text line
* listing the enabled actions.
*
* Parameters :