X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=actions.c;fp=actions.c;h=379c5e97b4ad6ad807960aaafd17fc797dc29163;hb=53748ca8ca3c893025be34dd4f104546fcbd0602;hp=7fbcd3a30d3e84f998ba58a264c02b10f7e481a3;hpb=70e904f66cfd8198f4e7325d0fb06405dd2f5038;p=privoxy.git diff --git a/actions.c b/actions.c index 7fbcd3a3..379c5e97 100644 --- a/actions.c +++ b/actions.c @@ -828,8 +828,12 @@ int update_action_bits_for_tag(struct client_state *csp, const char *tag) continue; } +#ifdef HAVE_PCRE2 + if (pcre2_pattern_matches(b->url->pattern.tag_regex, tag)) +#else /* and check if one of the tag patterns matches the tag, */ if (0 == regexec(b->url->pattern.tag_regex, tag, 0, NULL, 0)) +#endif { /* if it does, update the action bit map, */ if (merge_current_action(csp->action, b->action)) @@ -884,7 +888,11 @@ jb_err check_negative_tag_patterns(struct client_state *csp, unsigned int flag) } for (tag = csp->tags->first; NULL != tag; tag = tag->next) { +#ifdef HAVE_PCRE2 + if (pcre2_pattern_matches(b->url->pattern.tag_regex, tag->str)) +#else if (0 == regexec(b->url->pattern.tag_regex, tag->str, 0, NULL, 0)) +#endif { /* * The pattern matches at least one tag, thus the action