public function FeedsFetcherResult::sanitizeRaw in Feeds 7.2
Sanitize the raw content string.
Currently supported sanitizations:
- Remove BOM header from UTF-8 files.
Consider using ::sanitizeRawOptimized() instead that receives the variable by reference and thus saves memory.
Parameters
string $raw: The raw content string to be sanitized.
Return value
string The sanitized content as a string.
1 call to FeedsFetcherResult::sanitizeRaw()
- FeedsFileFetcherResult::getRaw in plugins/
FeedsFileFetcher.inc - Overrides parent::getRaw().
File
- plugins/
FeedsFetcher.inc, line 219 - Contains the FeedsFetcher and related classes.
Class
- FeedsFetcherResult
- Base class for all fetcher results.
Code
public function sanitizeRaw($raw) {
if (substr($raw, 0, 3) == pack('CCC', 0xef, 0xbb, 0xbf)) {
$raw = substr($raw, 3);
}
return $raw;
}