From Mailutils
Revision as of 18:50, 7 July 2014 by Gray (talk | contribs)
Jump to navigationJump to search

The htmlent filter converts characters <, >, and & to their corresponding HTML entites and vice-versa.

In encode mode, the filter replaces each occurrence of these characters with the corresponding named entity. In decode mode the reverse operation is performed.

The filter does not take arguments.

The following object, declared in mailutils/filter.h describes the htmlent filter:

extern mu_filter_record_t mu_htmlent_filter;

The example below shows how to create an instance of this filter in decode mode for reading:

  int rc;          /* Return code */
  mu_stream_t flt; /* Filter stream */
  mu_stream_t input; /* Input stream */
  initialize_input_stream (&stream);
  rc = mu_filter_stream_create (&flt, input, "htmlent", MU_FILTER_DECODE, MU_STREAM_READ);

See also