From 7a091c314fec5f118bb2055cc9fd766523975ee8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 26 Jul 2013 21:16:19 -0400 Subject: [PATCH] Add new allowed tags and new URI scheme --- vendor/PicoFeed/Filter.php | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/vendor/PicoFeed/Filter.php b/vendor/PicoFeed/Filter.php index 5640c20..82f87f2 100644 --- a/vendor/PicoFeed/Filter.php +++ b/vendor/PicoFeed/Filter.php @@ -11,6 +11,7 @@ class Filter private $strip_content = false; public $allowed_tags = array( + 'audio' => array('controls', 'src'), 'video' => array('poster', 'controls', 'height', 'width', 'src'), 'source' => array('src', 'type'), 'dt' => array(), @@ -54,15 +55,41 @@ class Filter 'script' ); + // http://en.wikipedia.org/wiki/URI_scheme public $allowed_protocols = array( - 'http://', - 'https://', - 'ftp://', - 'mailto:', '//', 'data:image/png;base64,', 'data:image/gif;base64,', - 'data:image/jpg;base64,' + 'data:image/jpg;base64,', + 'bitcoin:', + 'callto:', + 'ed2k://', + 'facetime://', + 'feed:', + 'ftp://', + 'geo:', + 'git://', + 'http://', + 'https://', + 'irc://', + 'irc6://', + 'ircs://', + 'jabber:', + 'magnet:', + 'mailto:', + 'nntp://', + 'rtmp://', + 'sftp://', + 'sip:', + 'sips:', + 'skype:', + 'smb://', + 'sms:', + 'spotify:', + 'ssh:', + 'steam:', + 'svn://', + 'tel:', ); public $protocol_attributes = array(