]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] Add chunk_htmlencode and chunk_asciiencode
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sat, 10 Oct 2009 19:06:03 +0000 (21:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Oct 2009 19:51:16 +0000 (21:51 +0200)
commitba8d7d3916d4ccbf0ddb152807ad80307d427777
treea5eb8623b5636f5bbc645c563f401147be3da6aa
parent3d5562b96ce91b75d468f8d50ad0d1c2df4ddc6f
[MINOR] Add chunk_htmlencode and chunk_asciiencode

Add two functions to encode input chunk replacing
non-printable, non ascii or special characters
with:
 "&#%u;"  - chunk_htmlencode
 "<%02X>" - chunk_asciiencode

Above functions should be used when adding strings, received
from possible unsafe sources, to html stats or logs.
include/proto/buffers.h
src/buffers.c