Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
dpiutil.c File Reference
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/socket.h>
#include "dpiutil.h"
Include dependency graph for dpiutil.c:

Go to the source code of this file.

Macros

#define _MSG(...)
 
#define MSG(...)   printf("[dpiutil.c]: " __VA_ARGS__)
 

Functions

char * Escape_uri_str (const char *str, const char *p_esc_set)
 
char * Unescape_uri_str (const char *s)
 
char * Escape_html_str (const char *str)
 
char * Unescape_html_str (const char *str)
 
char * Filter_smtp_hack (char *url)
 

Variables

static const char * unsafe_chars = "&<>\"'"
 
static const char * unsafe_rep []
 
static const int unsafe_rep_len [] = { 5, 4, 4, 6, 5 }
 

Macro Definition Documentation

◆ _MSG

#define _MSG (   ...)

Definition at line 26 of file dpiutil.c.

◆ MSG

#define MSG (   ...)    printf("[dpiutil.c]: " __VA_ARGS__)

Definition at line 27 of file dpiutil.c.

Function Documentation

◆ Escape_html_str()

◆ Escape_uri_str()

char * Escape_uri_str ( const char *  str,
const char *  p_esc_set 
)

◆ Filter_smtp_hack()

char * Filter_smtp_hack ( char *  url)

Definition at line 148 of file dpiutil.c.

References D_ASCII_TOLOWER.

Referenced by make_wget_argv().

◆ Unescape_html_str()

char * Unescape_html_str ( const char *  str)

◆ Unescape_uri_str()

char * Unescape_uri_str ( const char *  s)

Definition at line 64 of file dpiutil.c.

References D_ASCII_TOUPPER, and dStrdup().

Referenced by datauri_get_data().

Variable Documentation

◆ unsafe_chars

const char* unsafe_chars = "&<>\"'"
static

Definition at line 84 of file dpiutil.c.

Referenced by Escape_html_str(), and Unescape_html_str().

◆ unsafe_rep

const char* unsafe_rep[]
static
Initial value:
=
{ "&amp;", "&lt;", "&gt;", "&quot;", "&#39;" }

Definition at line 85 of file dpiutil.c.

Referenced by Escape_html_str(), and Unescape_html_str().

◆ unsafe_rep_len

const int unsafe_rep_len[] = { 5, 4, 4, 6, 5 }
static

Definition at line 87 of file dpiutil.c.

Referenced by Unescape_html_str().