diff options
author | dequis <dx@dxzone.com.ar> | 2015-03-01 04:23:08 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-03-01 17:46:41 -0300 |
commit | b0542e479435c9558d8c77f85a575dabdd61df92 (patch) | |
tree | 86c263cc180ea7230404f6beab358a8fb2663e92 /facebook/facebook-json.h | |
parent | 97f5a33c90cd22c4a03d3dda61e09be9b67091d9 (diff) | |
download | bitlbee-facebook-b0542e479435c9558d8c77f85a575dabdd61df92.tar.gz bitlbee-facebook-b0542e479435c9558d8c77f85a575dabdd61df92.tar.bz2 bitlbee-facebook-b0542e479435c9558d8c77f85a575dabdd61df92.tar.xz |
facebook-json: add fb_json_str_escape() to properly escape messages
Fixes issues such as losing messages that include a quote character.
Only escapes the minimum needed to work - control characters,
backslashes and quotes. UTF-8 chars are still valid json, so they are
sent as-is.
Diffstat (limited to 'facebook/facebook-json.h')
-rw-r--r-- | facebook/facebook-json.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/facebook/facebook-json.h b/facebook/facebook-json.h index 1720137..9fecbab 100644 --- a/facebook/facebook-json.h +++ b/facebook/facebook-json.h @@ -71,4 +71,6 @@ const gchar *fb_json_str(const json_value *json, const gchar *name); gboolean fb_json_str_chk(const json_value *json, const gchar *name, const gchar **val); +gchar *fb_json_str_escape(const gchar *str); + #endif /* _FACEBOOK_JSON_H */ |