}
*len = printedlen;
+
return res;
}
char *res;
res = printVal(tmpl, value, &len, node->nodeData.variable.formatValue);
- if ( res && len>0 ) {
+
+ if ( (node->nodeData.variable.flags & TND_HTMLESCAPE) && tmpl->htmlEscape )
+ res = tmpl->htmlEscape(res, &len);
+ if ( (node->nodeData.variable.flags & TND_URLESCAPE) && tmpl->urlEscape )
+ res = tmpl->urlEscape(res, &len);
+
+ if ( res && len>0 ) {
tmpl->printString( res, len );
mcfree(res);
}