X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_cgi.h;h=a14acdbd463a4c95cf6a60cd279b9d660b2ce5e4;hb=9cf5f9b6aac4ad0f2d164ba95698e9f1dfc9a8ea;hp=67e20656b2c6caa48edfc15ee4c1f48a84da01c4;hpb=8e72ccc76582cf1f68b6e9e4816ac0bd785fc7d8;p=collection4.git diff --git a/src/utils_cgi.h b/src/utils_cgi.h index 67e2065..a14acdb 100644 --- a/src/utils_cgi.h +++ b/src/utils_cgi.h @@ -1,3 +1,26 @@ +/** + * collection4 - utils_cgi.h + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #ifndef UTILS_CGI_H #define UTILS_CGI_H 1 @@ -47,6 +70,10 @@ char *uri_escape (const char *string); char *uri_escape_buffer (char *buffer, size_t buffer_size); char *uri_escape_copy (char *dest, const char *src, size_t n); +char *json_escape (const char *string); +char *json_escape_buffer (char *buffer, size_t buffer_size); +char *json_escape_copy (char *dest, const char *src, size_t n); + const char *script_name (void); int time_to_rfc1123 (time_t t, char *buffer, size_t buffer_size);