summaryrefslogtreecommitdiff
path: root/textcode.h
diff options
context:
space:
mode:
authorFelix von Leitner <felix-libowfat@fefe.de>2014-09-16 15:41:35 +0000
committerFelix von Leitner <felix-libowfat@fefe.de>2014-09-16 15:41:35 +0000
commit3f0fa50edca6ea8cdbfa49a394d94c9cfd343fa4 (patch)
tree45980b1717331ea54656e82d3274239168c2615f /textcode.h
parentfa5ffbb19b208180799f07298338917cecc4319e (diff)
downloadlibowfat-3f0fa50edca6ea8cdbfa49a394d94c9cfd343fa4.tar.gz
libowfat-3f0fa50edca6ea8cdbfa49a394d94c9cfd343fa4.zip
add fmt_html_tagarg, fmt_xml
Diffstat (limited to 'textcode.h')
-rw-r--r--textcode.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/textcode.h b/textcode.h
index 4032c1b..336668a 100644
--- a/textcode.h
+++ b/textcode.h
@@ -27,8 +27,15 @@ size_t fmt_urlencoded2(char* dest,const char* src,size_t len,const char* escapem
size_t fmt_yenc(char* dest,const char* src,size_t len);
/* Needs len*2 bytes */
size_t fmt_hexdump(char* dest,const char* src,size_t len);
-/* Change '<' to '&lt;' and '&' to '&amp;'; worst case: len*5 */
+/* Change '<' to '&lt;' and '&' to '&amp;' and '\n' to '<br>'; worst case: len*5 */
+/* This is meant for outputting text that goes between tags */
size_t fmt_html(char* dest,const char* src,size_t len);
+/* Change '<' to '&lt;' and '&' to '&amp;' and '"' to '&quot;'; worst case: len*6 */
+/* This is meant for outputting text that goes in a tag argument between double quotes*/
+size_t fmt_html_tagarg(char* dest,const char* src,size_t len);
+/* Change '<' to '&lt;' and '&' to '&amp;'; worst case: len*5 */
+size_t fmt_xml(char* dest,const char* src,size_t len);
+
/* Change '\' to "\\", '\n' to "\n", ^A to "\x01" etc; worst case: len*4 */
size_t fmt_cescape(char* dest,const char* src,size_t len);
/* Worst case: len*4 */