char EscapeAs = ' ';
if ((FormatTypeIndex < TP->Tokens->nParameters) &&
+ (TP->Tokens->Params[FormatTypeIndex] != NULL) &&
(TP->Tokens->Params[FormatTypeIndex]->Type == TYPE_STR) &&
(TP->Tokens->Params[FormatTypeIndex]->len >= 1)) {
pFmt = TP->Tokens->Params[FormatTypeIndex]->Start;
break;
case 'J':
StrECMAEscAppend(Target, Source, NULL);
- break;
+ break;
case 'K':
StrHtmlEcmaEscAppend(Target, Source, NULL, 0, 0);
- break;
+ break;
case 'U':
StrBufUrlescAppend(Target, Source, NULL);
break;
RetrieveHashlistFunc GetHash;
HashDestructorFunc Destructor;
SubTemplFunc DoSubTemplate;
+ FilterByParamFunc Filter;
} HashIterator;
void RegisterITERATOR(const char *Name, long len,
RetrieveHashlistFunc GetHash,
SubTemplFunc DoSubTempl,
HashDestructorFunc Destructor,
+ FilterByParamFunc Filter,
CtxType ContextType,
CtxType XPectContextType,
int Flags)
It->GetHash = GetHash;
It->DoSubTemplate = DoSubTempl;
It->Destructor = Destructor;
+ It->Filter = Filter;
It->ContextType = ContextType;
It->XPectContextType = XPectContextType;
It->Flags = Flags;
}
while (GetNextHashPos(List, it, &Status.KeyLen, &Status.Key, &vContext)) {
if ((Status.n >= StartAt) && (Status.n <= StopAt)) {
+
+ if ((It->Filter != NULL) &&
+ !It->Filter(Status.Key, Status.KeyLen, vContext, Target, TP))
+ {
+ continue;
+ }
+
if (DetectGroupChange && Status.n > 0) {
Status.GroupChange = SortBy->GroupChange(vContext, vLastContext);
}