WebStrings.cc File Reference
#include <unordered_map>#include <algorithm>#include <cstring>#include <boost/algorithm/string/case_conv.hpp>#include <boost/algorithm/string/trim.hpp>#include <boost/regex.hpp>#include <ssrc/wispers/utility/WebStrings.h>
Include dependency graph for WebStrings.cc:

Go to the source code of this file.
Namespaces | |
| namespace | utility |
The utility namespace contains utility classes. | |
Defines | |
| #define | FROM_HEX(c) (((c) >= 'A') ? (((c) & 0xdf) - 'A' + 10) : ((c) - '0')) |
Functions | |
| void | utility::escape_javascript (string &result, const char *text, const unsigned int text_size) |
| void | utility::escape_html (string &result, const char *text, const unsigned int text_size) |
| Escapes characters in text that could result in rendering HTML when passed to an HTML renderer. | |
| void | utility::escape_url (string &result, const char *text, const unsigned int text_size) |
| Escapes characters in text that are either reserved or "unsafe" according to RFC 1738. | |
| void | utility::unescape_url (string &url) |
| Unescapes URL escape sequences in place. | |
| void | utility::strip_html (string &result, const char *text, const unsigned int text_size) |
| Removes all HTML tags from text. | |
| void | utility::strip_html_and_unescape (string &result, const char *text, const unsigned int text_size) |
| Removes all HTML tags from text and unescapes character entities, converting them into the characters they represent. | |
| void | utility::wrap_lines (char *text, const unsigned int text_size, const unsigned int max_length) |
| Replaces spaces in text with newlines in such a manner that no line exceeds a specified maximum length, except for sequences of characters uninterrupted by spaces that exceed the maximum line length. | |
| title_body_type | utility::html_title_and_body (const char *begin, const char *end) |
| Returns the offsets of the title and body of an HTML document. | |
Define Documentation
| #define FROM_HEX | ( | c | ) | (((c) >= 'A') ? (((c) & 0xdf) - 'A' + 10) : ((c) - '0')) |
Referenced by utility::unescape_url().
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.