You are here: Documentation
Search
You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate button.
Results
sanitize(): 23 Hits
====== sanitize() ======
===== Description =====
<code>class SimplePie {
sanitize ( mixed $data, integer $type, [ string $base = '' ] )
}</code>
Sanitizes the incoming data to ensure that it matches the type of data expected. Also absolutizes relative URLs, and a few other things to ensure the data is of the best quality.
===== Availability =====
* Available since SimplePie 1.0.
===== Parameters =====
==== data ====
The data that needs to be sanitized.
==== type ====
The type of data that it's supposed to be.
* ''SIMPLEPIE_CONSTRUCT_NONE''\\ No construct (:?: This could use a better description)
* ''SIMPLEPIE_CONSTRUCT_TEXT''\\ Plain text content
* ''SIMPLEPIE_CONSTRUCT_HTML''\\ HTML content
* ''SIMPLEPIE_CONSTRUCT_XHTML''\\ XHTML content
* ''SIMPLEPIE_CONSTRUCT_BASE64''\\ Base64 content
* ''SIMPLEPIE_CONSTRUCT_IRI''\\ IRI content (e.g. URLs, URIs, etc.)
* ''SIMPLEPIE_CONSTRUCT_MAYBE_HTML''\\ Might be HTML, so let's treat it as such.
* ''SIMPLEPIE_CONSTRUCT_ALL''\\ All types of content
==== base ====
The ''xml:base'' value to use when converting relative URLs to absolute ones.
===== Examples =====
==== Sanitize the data as a URL ====
<code php>$data = $feed->sanitize('http://simplepie.org/wiki/', SIMPLEPIE_CONSTRUCT_IRI);</code>
===== See Also =====
* [[reference:SimplePie:start]]