Last active
February 23, 2020 14:23
-
-
Save AvverbioPronome/effb3e56436a3fed7b4c73d72d064c66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ff_nonprintables extends Plugin { | |
private $host; | |
function about(){ | |
return array(0.1, "nonprintables", "peppec", false); | |
// inspired by https://github.com/fastcat/tt-rss-ff-xmllint | |
} | |
function api_version(){ | |
return 2; | |
} | |
function init($host){ | |
$this->host = $host; | |
$host->add_hook($host::HOOK_FEED_FETCHED, $this); | |
} | |
function hook_feed_fetched($input){ | |
return preg_replace('/[\x00-\x08\x0e-\x1f]/', '', $input); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment