61 Commits

Author SHA1 Message Date
leitner
708e34ab7f don't escape poop emoji (emit as utf8 instead)
if input is not valid utf8, encode each invalid byte as utf8 in output
2018-02-02 18:16:09 +00:00
leitner
2aceb52138 remove warning 2017-11-24 17:22:40 +00:00
leitner
5a803f3e7c update man pages 2017-08-07 19:25:09 +00:00
leitner
928da70f1d add man pages for scan_urlencoded* 2017-07-30 14:16:04 +00:00
leitner
42a78bb04e man page and unit tests for scan_hexdump 2017-07-30 13:50:12 +00:00
leitner
c8156a9841 add man page and unit tests for scan_base64url 2017-07-30 13:41:43 +00:00
leitner
8d449d442b don't write one more byte in error case 2017-07-30 12:46:21 +00:00
leitner
527e2e7c5b add unit tests and man page for scan_ldapescape 2017-07-30 12:42:07 +00:00
leitner
ac2df2bf20 bring scan_cescape up to speed 2017-07-30 12:31:12 +00:00
leitner
8526ae3d0d fix utf-8 json encoding for outside basic multilingual plane 2017-07-25 19:50:33 +00:00
leitner
84d3e6a7b4 fmt_jsonescape: convert utf-8 >ffff to \u escaped surrogate pair 2017-07-25 18:46:24 +00:00
leitner
b9eb81c58f move unit tests into each file (compile with -DUNITTEST) 2017-05-13 22:52:21 +00:00
leitner
760598ec2f #include <foo.h> -> #include <libowfat/foo.h> 2017-05-13 22:51:26 +00:00
leitner
dba47741bf remove new compiler warnings from gcc 7 2017-04-30 20:22:21 +00:00
leitner
660c314341 a few more test suites
escapecharc now supports non-ascii
2017-04-30 20:16:09 +00:00
leitner
e89f098743 remove signedness warnings 2017-03-15 10:36:02 +00:00
leitner
ce64436772 document scan_uuencoded 2017-03-13 18:12:31 +00:00
leitner
959151a24d add man page for scan_base64, handle partial blocks better 2017-03-13 17:50:19 +00:00
leitner
41db97d380 improve json escape decoder, add test suite 2017-03-13 14:45:48 +00:00
leitner
3c68ae0dcc scan_jsonescape ends when it sees an unescaped " 2017-03-13 13:46:37 +00:00
leitner
c493b262ac handle \n etc 2017-02-28 12:27:46 +00:00
leitner
26a193bff0 - and _ are also safe characters 2016-11-23 01:36:27 +00:00
leitner
d26b8082d8 shut up new gcc 6 warnings 2016-04-27 14:07:49 +00:00
leitner
7f829a36bc add base64url support 2016-02-28 12:24:47 +00:00
leitner
fce165fdcb remove dead store 2015-04-10 23:15:59 +00:00
leitner
8bdf66a1f5 add scan_html_tagarg 2014-09-17 13:58:59 +00:00
leitner
1d723c8da4 scan_html forgot to output '<' when it did not know the tag coming in 2014-09-17 13:43:54 +00:00
leitner
0aa50a19a4 add fmt_html_tagarg, fmt_xml 2014-09-16 15:41:35 +00:00
leitner
35942878c2 $ make WERROR=-Werror now builds with -Werror
add some single char escaping routines to fmt.h
pull in html5 entities from w3c and use those to do a proper scan_html decoding
fix an off-by-one in fmt_to_array
add a ton of unit tests for the fmt routines
2014-03-13 22:25:20 +00:00
leitner
fb5bd841a8 | not + 2014-02-25 17:51:29 +00:00
leitner
1d2add208f add json encoding routines to textcode 2014-01-28 16:12:39 +00:00
leitner
f28b0ee6b2 add fmt_ldapescape2 2007-06-28 22:46:58 +00:00
leitner
e0a6a1cb84 try to catch malicious input in textcode fmt_* functions 2007-06-28 21:00:40 +00:00
leitner
1b17f47def escape more in fmt_ldapescape 2007-06-28 20:01:05 +00:00
leitner
3004b518ef switch to size_t and ssize_t 2006-11-07 17:56:05 +00:00
leitner
d361d81c64 make socket_(tc|ud)p[46] actually return non-blocking sockets as
documented (Richard Lyons)
2006-05-18 06:02:43 +00:00
leitner
0a47d9ea13 fix scan_to_sa (Tim Lorenz) 2005-06-08 04:08:18 +00:00
leitner
828aa295f1 optimize fmt_base64 (Dan Gundlach) 2005-04-12 06:48:39 +00:00
leitner
60f3320ae0 allow specifying more characters to encode for subset encoders (for
example, you can say that fmt_quotedprintable should also escape ':', if
you want to use ':' as separator in a data file.
2005-03-30 13:22:17 +00:00
leitner
f7809e36df scan_urlencoded2 is like scan_urlencoded, but it will not decode '+' in urls 2005-02-21 13:07:13 +00:00
leitner
f52aa87441 more alloca fixes 2004-01-06 23:35:06 +00:00
leitner
60d00ede11 remove some warnings 2004-01-06 23:26:55 +00:00
leitner
3279ca84f8 don't use black list for urlencoding, use white list. 2003-09-29 01:12:36 +00:00
leitner
c901631a00 embarassing cut&paste error 2003-09-24 22:51:40 +00:00
leitner
056760c5f1 add cescape stuff and two tests 2003-09-19 19:08:51 +00:00
leitner
a8f6a1c121 remove special case stralloc textcode functions
write generic stralloc and array textcode wrapper functions
change textcode API to use long instead of int
add cescape fmt and scan functions to textcode
add fmt_foldwhitespace to textcode
2003-09-19 19:08:13 +00:00
leitner
93e07c1174 add + to unsafe characters in fmt_urlencoded 2003-09-15 10:45:26 +00:00
leitner
0546ea048c add html encoders
add vd (mldonkey support program) as test for socket API
2003-04-23 20:17:57 +00:00
leitner
71deab2eec remove warnings 2003-02-27 17:26:39 +00:00
leitner
b4f14ed6f7 add stralloc versions of textcode (Kai Ruemmler) 2003-02-27 17:23:14 +00:00