From: Mikael Nordfeldth Date: Wed, 3 Feb 2016 13:36:51 +0000 (+0100) Subject: HTMLPurifierSchemes plugin to allow geo and magnet URIs X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=90045d66ea8dd098cb57b5844f05050a528bf037;p=quix0rs-gnu-social.git HTMLPurifierSchemes plugin to allow geo and magnet URIs --- diff --git a/lib/default.php b/lib/default.php index 947875fa58..b59d249f2f 100644 --- a/lib/default.php +++ b/lib/default.php @@ -304,6 +304,7 @@ $default = 'AuthCrypt' => array(), 'Cronish' => array(), 'Favorite' => array(), + 'HTMLPurifierSchemes' => array(), 'Share' => array(), 'LRDD' => array(), ), diff --git a/plugins/HTMLPurifierSchemes/HTMLPurifierSchemesPlugin.php b/plugins/HTMLPurifierSchemes/HTMLPurifierSchemesPlugin.php new file mode 100644 index 0000000000..d8ca619dec --- /dev/null +++ b/plugins/HTMLPurifierSchemes/HTMLPurifierSchemesPlugin.php @@ -0,0 +1,43 @@ +. + */ + +if (!defined('GNUSOCIAL')) { exit(1); } + +// because autoloading classes won't work otherwise +require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php'; + +/** + * @package Activity + * @maintainer Mikael Nordfeldth + */ +class HTMLPurifierSchemesPlugin extends Plugin +{ + public function onPluginVersion(array &$versions) + { + $versions[] = array('name' => 'HTMLPurifier Schemes', + 'version' => GNUSOCIAL_VERSION, + 'author' => 'Mikael Nordfeldth', + 'homepage' => 'https://gnu.io/social', + 'rawdescription' => + // TRANS: Plugin description. + _m('Additional URI schemes for HTMLPurifier.')); + + return true; + } +} diff --git a/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/geo.php b/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/geo.php new file mode 100644 index 0000000000..5a6119967e --- /dev/null +++ b/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/geo.php @@ -0,0 +1,35 @@ +userinfo = null; + $uri->host = null; + $uri->port = null; + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/magnet.php b/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/magnet.php new file mode 100644 index 0000000000..5cb72ca845 --- /dev/null +++ b/plugins/HTMLPurifierSchemes/lib/htmlpurifier/urischeme/magnet.php @@ -0,0 +1,35 @@ +userinfo = null; + $uri->host = null; + $uri->port = null; + return true; + } +} + +// vim: et sw=4 sts=4