Crate pulldown_cmark_escape

source ·
Expand description

Utility functions for HTML escaping. Only useful when building your own HTML renderer.

Structs§

  • This wrapper exists because we can’t have both a blanket implementation for all types implementing io::Write and types of the form &mut W where W: StrWrite. Since we need the latter a lot, we choose to wrap Write types.
  • This wrapper exists because we can’t have both a blanket implementation for all types implementing Write and types of the for &mut W where W: StrWrite. Since we need the latter a lot, we choose to wrap Write types.

Traits§

  • Trait that allows writing string slices. This is basically an extension of std::io::Write in order to include String.

Functions§

  • Writes an href to the buffer, escaping href unsafe bytes.
  • Writes the given string to the Write sink, replacing special HTML bytes (<, >, &, “, ’) by escape sequences.
  • For use in HTML body text, writes the given string to the Write sink, replacing special HTML bytes (<, >, &) by escape sequences.