SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » encode_instead_of_strip()

encode_instead_of_strip()

Description

class SimplePie {
	encode_instead_of_strip ( [bool $enable = true] )
}

This works in conjunction with strip_htmltags(), where instead of stripping the tags, it simply encodes them.

Availability

  • Available since SimplePie Beta 2.

Parameters

enable

Enable/disable encoding.

Examples

Enable encoding instead of stripping

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->encode_instead_of_strip(true);
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/encode_instead_of_strip.txt · Last modified: 2011/03/06 03:56 (external edit)