htmlize 0.5.1

Encode and decode HTML entities in UTF-8
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(test)]

extern crate test;

use htmlize::*;

#[macro_use]
mod helpers;

const SMALL_DIRTY: &str = "<a href=\"http://example.com/\">link</a> & [link]";
const SMALL_CLEAN: &str = ".a href=.http://example.com/..link./a. . [link]";
const BIG_DIRTY: &str = include_str!("../tests/corpus/html-raw.txt");
const BIG_CLEAN: &str = include_str!("../tests/corpus/html-cleaned.txt");

bench_func!(escape_text_small_dirty, escape_text, SMALL_DIRTY);
bench_func!(escape_text_small_clean, escape_text, SMALL_CLEAN);
bench_func!(escape_text_big_dirty, escape_text, BIG_DIRTY);
bench_func!(escape_text_big_clean, escape_text, BIG_CLEAN);