src/fs/Makefile
src/ftp/Makefile
src/helper/Makefile
+ src/html/Makefile
src/http/Makefile
src/http/one/Makefile
src/http/url_rewriters/Makefile
libmiscencoding_la_SOURCES = \
base64.c \
- html_quote.c \
md5.c \
rfc1738.c \
rfc2617.c
LoadableModules.cc \
LoadableModules.h
-SUBDIRS = mem time debug base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
+SUBDIRS = mem time debug base anyp helper dns html ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
if ENABLE_AUTH
SUBDIRS += auth
$(REGEXLIB) \
$(ADAPTATION_LIBS) \
$(ESI_LIBS) \
+ html/libhtml.la \
$(SNMP_LIBS) \
mem/libmem.la \
store/libstore.la \
dns/libdns.la \
base/libbase.la \
mgr/libmgr.la \
+ html/libhtml.la \
sbuf/libsbuf.la \
debug/libdebug.la \
store/libstore.la \
dns/libdns.la \
base/libbase.la \
mgr/libmgr.la \
+ html/libhtml.la \
anyp/libanyp.la \
$(SNMP_LIBS) \
icmp/libicmp.la \
anyp/libanyp.la \
ipc/libipc.la \
mgr/libmgr.la \
+ html/libhtml.la \
$(SNMP_LIBS) \
mem/libmem.la \
store/libstore.la \
#include "fd.h"
#include "fde.h"
#include "FwdState.h"
-#include "html_quote.h"
+#include "html/Quoting.h"
#include "HttpHdrContRange.h"
#include "HttpHeader.h"
#include "HttpHeaderRange.h"
#include "fde.h"
#include "format/Format.h"
#include "fs_io.h"
-#include "html_quote.h"
+#include "html/Quoting.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
--- /dev/null
+## Copyright (C) 1996-2023 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+noinst_LTLIBRARIES = libhtml.la
+
+libhtml_la_SOURCES = \
+ Quoting.cc \
+ Quoting.h
*/
#include "squid.h"
-#include "html_quote.h"
-
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include "html/Quoting.h"
/*
* HTML defines these characters as special entities that should be quoted.
char *
html_quote(const char *string)
{
- static char *buf;
+ static char *buf = nullptr;
static size_t bufsize = 0;
const char *src;
char *dst;
/* XXX This really should be implemented using a MemPool, but
* MemPools are not yet available in lib...
*/
- if (buf == NULL || strlen(string) * 6 > bufsize) {
+ if (!buf || strlen(string) * 6 > bufsize) {
xfree(buf);
bufsize = strlen(string) * 6 + 1;
- buf = xcalloc(bufsize, 1);
+ buf = static_cast<char *>(xcalloc(bufsize, 1));
}
for (src = string, dst = buf; *src; src++) {
const char *escape = NULL;
* Please see the COPYING and CONTRIBUTORS files for details.
*/
-#ifndef _SQUID_HTML_QUOTE_H
-#define _SQUID_HTML_QUOTE_H
-
-#ifdef __cplusplus
-extern "C"
-#else
-extern
-#endif
+#ifndef SQUID__SRC_HTML_QUOTING_H
+#define SQUID__SRC_HTML_QUOTING_H
char *html_quote(const char *);
-#endif /* _SQUID_HTML_QUOTE_H */
+#endif /* SQUID__SRC_HTML_QUOTING_H */
#include "squid.h"
#include "base/IoManip.h"
#include "error/SysErrorDetail.h"
-#include "html_quote.h"
+#include "html/Quoting.h"
#include "sbuf/SBuf.h"
#include "sbuf/Stream.h"
#include "security/Certificate.h"
DISTCLEANFILES=
LDADD= \
+ $(top_builddir)/src/html/libhtml.la \
$(top_builddir)/src/ip/libip.la \
$(top_builddir)/src/mem/libminimal.la \
$(top_builddir)/src/time/libtime.la \
#include "base/CharacterSet.h"
#include "base64.h"
#include "getfullhostname.h"
-#include "html_quote.h"
+#include "html/Quoting.h"
#include "ip/Address.h"
#include "MemBuf.h"
#include "rfc1738.h"