Skip to content

Instantly share code, notes, and snippets.

@AvverbioPronome
Last active February 23, 2020 14:23
Show Gist options
  • Save AvverbioPronome/effb3e56436a3fed7b4c73d72d064c66 to your computer and use it in GitHub Desktop.
Save AvverbioPronome/effb3e56436a3fed7b4c73d72d064c66 to your computer and use it in GitHub Desktop.
<?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