add firehazard.c
This commit is contained in:
@@ -166,11 +166,17 @@ esp_err_t tpl_kv_replacer(httpd_req_t *r, void *context, const char *token, tpl_
|
||||
struct tpl_kv_list *head = context;
|
||||
SLIST_FOREACH(entry, head, link) {
|
||||
if (0==strcmp(entry->key, token)) {
|
||||
return httpd_resp_send_chunk_escaped(r,
|
||||
entry->subst_heap ?
|
||||
entry->subst_heap :
|
||||
entry->subst,
|
||||
-1, escape);
|
||||
if (entry->subst_heap) {
|
||||
if (entry->subst_heap[0]) {
|
||||
return httpd_resp_send_chunk_escaped(r, entry->subst_heap, -1, escape);
|
||||
}
|
||||
} else {
|
||||
if (entry->subst[0]) {
|
||||
return httpd_resp_send_chunk_escaped(r, entry->subst, -1, escape);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user