mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
composer update
This commit is contained in:
parent
61953c11ca
commit
8d64aa1084
350 changed files with 3682 additions and 18177 deletions
|
@ -33,7 +33,6 @@
|
|||
"bshaffer/oauth2-server-php": "^1.9",
|
||||
"ezyang/htmlpurifier": "^4.9",
|
||||
"league/html-to-markdown": "^4.4",
|
||||
"pear/text_languagedetect": "^1.0",
|
||||
"commerceguys/intl": "~0.7",
|
||||
"smarty/smarty": "~3.1",
|
||||
"ramsey/uuid": "^3.8",
|
||||
|
@ -53,8 +52,7 @@
|
|||
"league/oauth2-linkedin": "^5.1",
|
||||
"forkawesome/fork-awesome": "^1.1",
|
||||
"svg-edit/svgedit": "^5.0",
|
||||
"p3k/emoji-detector": "^0.2.1",
|
||||
"shubhamjain/php-id3": "dev-master"
|
||||
"p3k/emoji-detector": "^0.2.1"
|
||||
},
|
||||
"require-dev" : {
|
||||
"phpunit/phpunit" : "@stable",
|
||||
|
|
1724
composer.lock
generated
1724
composer.lock
generated
File diff suppressed because it is too large
Load diff
69
vendor/composer/LICENSE
vendored
69
vendor/composer/LICENSE
vendored
|
@ -1,56 +1,19 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Composer
|
||||
Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
|
||||
Source: https://github.com/composer/composer
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Files: *
|
||||
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
||||
2016, Jordi Boggiano <j.boggiano@seld.be>
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
Files: src/Composer/Util/TlsHelper.php
|
||||
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
||||
2016, Jordi Boggiano <j.boggiano@seld.be>
|
||||
2013, Evan Coury <me@evancoury.com>
|
||||
License: Expat and BSD-2-Clause
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
License: BSD-2-Clause
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
19
vendor/composer/autoload_classmap.php
vendored
19
vendor/composer/autoload_classmap.php
vendored
|
@ -284,7 +284,6 @@ return array(
|
|||
'HTMLPurifier_Injector_SafeObject' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php',
|
||||
'HTMLPurifier_Language' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php',
|
||||
'HTMLPurifier_LanguageFactory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php',
|
||||
'HTMLPurifier_Language_en_x_test' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php',
|
||||
'HTMLPurifier_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php',
|
||||
'HTMLPurifier_Lexer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php',
|
||||
'HTMLPurifier_Lexer_DOMLex' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php',
|
||||
|
@ -593,10 +592,6 @@ return array(
|
|||
'PHPGit\\Command\\TreeCommand' => $vendorDir . '/kzykhys/git/src/PHPGit/Command/TreeCommand.php',
|
||||
'PHPGit\\Exception\\GitException' => $vendorDir . '/kzykhys/git/src/PHPGit/Exception/GitException.php',
|
||||
'PHPGit\\Git' => $vendorDir . '/kzykhys/git/src/PHPGit/Git.php',
|
||||
'PhpId3\\BinaryFileReader' => $vendorDir . '/shubhamjain/php-id3/PhpId3/BinaryFileReader.php',
|
||||
'PhpId3\\Id3Tags' => $vendorDir . '/shubhamjain/php-id3/PhpId3/Id3Tags.php',
|
||||
'PhpId3\\Id3TagsReader' => $vendorDir . '/shubhamjain/php-id3/PhpId3/Id3TagsReader.php',
|
||||
'PhpId3\\Tests\\GenerateCvCommandTest' => $vendorDir . '/shubhamjain/php-id3/Tests/Id3TagsReaderTest.php',
|
||||
'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
|
||||
'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
|
||||
'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
|
||||
|
@ -1197,6 +1192,7 @@ return array(
|
|||
'Smarty_Template_Source' => $vendorDir . '/smarty/smarty/libs/sysplugins/smarty_template_source.php',
|
||||
'Smarty_Undefined_Variable' => $vendorDir . '/smarty/smarty/libs/sysplugins/smarty_undefined_variable.php',
|
||||
'Smarty_Variable' => $vendorDir . '/smarty/smarty/libs/sysplugins/smarty_variable.php',
|
||||
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php',
|
||||
|
@ -1207,6 +1203,7 @@ return array(
|
|||
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => $vendorDir . '/symfony/options-resolver/OptionConfigurator.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php',
|
||||
'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php',
|
||||
|
@ -1230,15 +1227,12 @@ return array(
|
|||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
|
||||
'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php',
|
||||
'TPC_yyStackEntry' => $vendorDir . '/smarty/smarty/libs/sysplugins/smarty_internal_configfileparser.php',
|
||||
'TP_yyStackEntry' => $vendorDir . '/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php',
|
||||
'Text_LanguageDetect' => $vendorDir . '/pear/text_languagedetect/Text/LanguageDetect.php',
|
||||
'Text_LanguageDetect_Exception' => $vendorDir . '/pear/text_languagedetect/Text/LanguageDetect/Exception.php',
|
||||
'Text_LanguageDetect_ISO639' => $vendorDir . '/pear/text_languagedetect/Text/LanguageDetect/ISO639.php',
|
||||
'Text_LanguageDetect_Parser' => $vendorDir . '/pear/text_languagedetect/Text/LanguageDetect/Parser.php',
|
||||
'URLify' => $vendorDir . '/jbroadway/urlify/URLify.php',
|
||||
'URLifyTest' => $vendorDir . '/jbroadway/urlify/tests/URLifyTest.php',
|
||||
'UploadHandler' => $vendorDir . '/blueimp/jquery-file-upload/server/php/UploadHandler.php',
|
||||
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
||||
'Zotlabs\\Access\\AccessControl' => $baseDir . '/Zotlabs/Access/AccessControl.php',
|
||||
'Zotlabs\\Access\\PermissionLimits' => $baseDir . '/Zotlabs/Access/PermissionLimits.php',
|
||||
'Zotlabs\\Access\\PermissionRoles' => $baseDir . '/Zotlabs/Access/PermissionRoles.php',
|
||||
|
@ -1268,6 +1262,7 @@ return array(
|
|||
'Zotlabs\\Daemon\\Onepoll' => $baseDir . '/Zotlabs/Daemon/Onepoll.php',
|
||||
'Zotlabs\\Daemon\\Poller' => $baseDir . '/Zotlabs/Daemon/Poller.php',
|
||||
'Zotlabs\\Daemon\\Queue' => $baseDir . '/Zotlabs/Daemon/Queue.php',
|
||||
'Zotlabs\\Daemon\\Run' => $baseDir . '/Zotlabs/Daemon/Run.php',
|
||||
'Zotlabs\\Daemon\\Thumbnail' => $baseDir . '/Zotlabs/Daemon/Thumbnail.php',
|
||||
'Zotlabs\\Daemon\\Xchan_photo' => $baseDir . '/Zotlabs/Daemon/Xchan_photo.php',
|
||||
'Zotlabs\\Extend\\Hook' => $baseDir . '/Zotlabs/Extend/Hook.php',
|
||||
|
@ -1430,7 +1425,6 @@ return array(
|
|||
'Zotlabs\\Module\\Magic' => $baseDir . '/Zotlabs/Module/Magic.php',
|
||||
'Zotlabs\\Module\\Manage' => $baseDir . '/Zotlabs/Module/Manage.php',
|
||||
'Zotlabs\\Module\\Menu' => $baseDir . '/Zotlabs/Module/Menu.php',
|
||||
'Zotlabs\\Module\\Message' => $baseDir . '/Zotlabs/Module/Message.php',
|
||||
'Zotlabs\\Module\\Mitem' => $baseDir . '/Zotlabs/Module/Mitem.php',
|
||||
'Zotlabs\\Module\\Moderate' => $baseDir . '/Zotlabs/Module/Moderate.php',
|
||||
'Zotlabs\\Module\\Mood' => $baseDir . '/Zotlabs/Module/Mood.php',
|
||||
|
@ -1792,6 +1786,7 @@ return array(
|
|||
'Zotlabs\\Update\\_1237' => $baseDir . '/Zotlabs/Update/_1237.php',
|
||||
'Zotlabs\\Update\\_1238' => $baseDir . '/Zotlabs/Update/_1238.php',
|
||||
'Zotlabs\\Update\\_1239' => $baseDir . '/Zotlabs/Update/_1239.php',
|
||||
'Zotlabs\\Update\\_1240' => $baseDir . '/Zotlabs/Update/_1240.php',
|
||||
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
'Zotlabs\\Web\\HTTPSig' => $baseDir . '/Zotlabs/Web/HTTPSig.php',
|
||||
|
@ -1820,7 +1815,6 @@ return array(
|
|||
'Zotlabs\\Widget\\Clock' => $baseDir . '/Zotlabs/Widget/Clock.php',
|
||||
'Zotlabs\\Widget\\Collections' => $baseDir . '/Zotlabs/Widget/Collections.php',
|
||||
'Zotlabs\\Widget\\Common_friends' => $baseDir . '/Zotlabs/Widget/Common_friends.php',
|
||||
'Zotlabs\\Widget\\Conversations' => $baseDir . '/Zotlabs/Widget/Conversations.php',
|
||||
'Zotlabs\\Widget\\Cover_photo' => $baseDir . '/Zotlabs/Widget/Cover_photo.php',
|
||||
'Zotlabs\\Widget\\Design_tools' => $baseDir . '/Zotlabs/Widget/Design_tools.php',
|
||||
'Zotlabs\\Widget\\Dirsort' => $baseDir . '/Zotlabs/Widget/Dirsort.php',
|
||||
|
@ -1862,7 +1856,6 @@ return array(
|
|||
'Zotlabs\\Widget\\Vcard' => $baseDir . '/Zotlabs/Widget/Vcard.php',
|
||||
'Zotlabs\\Widget\\Website_portation_tools' => $baseDir . '/Zotlabs/Widget/Website_portation_tools.php',
|
||||
'Zotlabs\\Widget\\Zcard' => $baseDir . '/Zotlabs/Widget/Zcard.php',
|
||||
'Zotlabs\\Zot6\\Finger' => $baseDir . '/Zotlabs/Zot6/Finger.php',
|
||||
'Zotlabs\\Zot6\\IHandler' => $baseDir . '/Zotlabs/Zot6/IHandler.php',
|
||||
'Zotlabs\\Zot6\\Receiver' => $baseDir . '/Zotlabs/Zot6/Receiver.php',
|
||||
'Zotlabs\\Zot6\\Zot6Handler' => $baseDir . '/Zotlabs/Zot6/Zot6Handler.php',
|
||||
|
|
2
vendor/composer/autoload_files.php
vendored
2
vendor/composer/autoload_files.php
vendored
|
@ -14,11 +14,13 @@ return array(
|
|||
'383eaff206634a77a1be54e64e6459c7' => $vendorDir . '/sabre/uri/lib/functions.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'2b9d0f43f9552984cfa82fee95491826' => $vendorDir . '/sabre/event/lib/coroutine.php',
|
||||
'd81bab31d3feb45bfe2f283ea3c8fdf7' => $vendorDir . '/sabre/event/lib/Loop/functions.php',
|
||||
'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php',
|
||||
'3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php',
|
||||
'93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php',
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
||||
'b45b351e6b6f7487d819961fef2fda77' => $vendorDir . '/jakeasmith/http_build_url/src/http_build_url.php',
|
||||
'757772e28a0943a9afe83def8db95bdf' => $vendorDir . '/mf2/mf2/Mf2/Parser.php',
|
||||
'ebdb698ed4152ae445614b69b5e4bb6a' => $vendorDir . '/sabre/http/lib/functions.php',
|
||||
|
|
2
vendor/composer/autoload_namespaces.php
vendored
2
vendor/composer/autoload_namespaces.php
vendored
|
@ -7,8 +7,6 @@ $baseDir = dirname($vendorDir);
|
|||
|
||||
return array(
|
||||
'URLify' => array($vendorDir . '/jbroadway/urlify'),
|
||||
'Text' => array($vendorDir . '/pear/text_languagedetect'),
|
||||
'PhpId3' => array($vendorDir . '/shubhamjain/php-id3'),
|
||||
'OAuth2' => array($vendorDir . '/bshaffer/oauth2-server-php/src'),
|
||||
'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'),
|
||||
'' => array($vendorDir . '/kzykhys/git/src'),
|
||||
|
|
2
vendor/composer/autoload_psr4.php
vendored
2
vendor/composer/autoload_psr4.php
vendored
|
@ -6,9 +6,9 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'voku\\tests\\' => array($vendorDir . '/voku/portable-ascii/tests'),
|
||||
'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku', $vendorDir . '/voku/stop-words/src/voku'),
|
||||
'Zotlabs\\' => array($baseDir . '/Zotlabs'),
|
||||
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
|
||||
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
|
||||
|
|
7
vendor/composer/autoload_real.php
vendored
7
vendor/composer/autoload_real.php
vendored
|
@ -13,6 +13,9 @@ class ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Autoload\ClassLoader
|
||||
*/
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
|
@ -23,10 +26,6 @@ class ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d', 'loadClassLoader'));
|
||||
|
||||
$includePaths = require __DIR__ . '/include_paths.php';
|
||||
$includePaths[] = get_include_path();
|
||||
set_include_path(implode(PATH_SEPARATOR, $includePaths));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
|
45
vendor/composer/autoload_static.php
vendored
45
vendor/composer/autoload_static.php
vendored
|
@ -15,11 +15,13 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'383eaff206634a77a1be54e64e6459c7' => __DIR__ . '/..' . '/sabre/uri/lib/functions.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'2b9d0f43f9552984cfa82fee95491826' => __DIR__ . '/..' . '/sabre/event/lib/coroutine.php',
|
||||
'd81bab31d3feb45bfe2f283ea3c8fdf7' => __DIR__ . '/..' . '/sabre/event/lib/Loop/functions.php',
|
||||
'a1cce3d26cc15c00fcd0b3354bd72c88' => __DIR__ . '/..' . '/sabre/event/lib/Promise/functions.php',
|
||||
'3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php',
|
||||
'93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php',
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
||||
'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
|
||||
'757772e28a0943a9afe83def8db95bdf' => __DIR__ . '/..' . '/mf2/mf2/Mf2/Parser.php',
|
||||
'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php',
|
||||
|
@ -33,7 +35,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
public static $prefixLengthsPsr4 = array (
|
||||
'v' =>
|
||||
array (
|
||||
'voku\\tests\\' => 11,
|
||||
'voku\\' => 5,
|
||||
),
|
||||
'Z' =>
|
||||
|
@ -42,6 +43,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
),
|
||||
'S' =>
|
||||
array (
|
||||
'Symfony\\Polyfill\\Php80\\' => 23,
|
||||
'Symfony\\Polyfill\\Php72\\' => 23,
|
||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
|
||||
|
@ -100,10 +102,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'voku\\tests\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/voku/portable-ascii/tests',
|
||||
),
|
||||
'voku\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku',
|
||||
|
@ -113,6 +111,10 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
array (
|
||||
0 => __DIR__ . '/../..' . '/Zotlabs',
|
||||
),
|
||||
'Symfony\\Polyfill\\Php80\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
|
||||
),
|
||||
'Symfony\\Polyfill\\Php72\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
|
||||
|
@ -248,20 +250,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
0 => __DIR__ . '/..' . '/jbroadway/urlify',
|
||||
),
|
||||
),
|
||||
'T' =>
|
||||
array (
|
||||
'Text' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/pear/text_languagedetect',
|
||||
),
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
'PhpId3' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/shubhamjain/php-id3',
|
||||
),
|
||||
),
|
||||
'O' =>
|
||||
array (
|
||||
'OAuth2' =>
|
||||
|
@ -561,7 +549,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'HTMLPurifier_Injector_SafeObject' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php',
|
||||
'HTMLPurifier_Language' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php',
|
||||
'HTMLPurifier_LanguageFactory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php',
|
||||
'HTMLPurifier_Language_en_x_test' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php',
|
||||
'HTMLPurifier_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php',
|
||||
'HTMLPurifier_Lexer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php',
|
||||
'HTMLPurifier_Lexer_DOMLex' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php',
|
||||
|
@ -870,10 +857,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'PHPGit\\Command\\TreeCommand' => __DIR__ . '/..' . '/kzykhys/git/src/PHPGit/Command/TreeCommand.php',
|
||||
'PHPGit\\Exception\\GitException' => __DIR__ . '/..' . '/kzykhys/git/src/PHPGit/Exception/GitException.php',
|
||||
'PHPGit\\Git' => __DIR__ . '/..' . '/kzykhys/git/src/PHPGit/Git.php',
|
||||
'PhpId3\\BinaryFileReader' => __DIR__ . '/..' . '/shubhamjain/php-id3/PhpId3/BinaryFileReader.php',
|
||||
'PhpId3\\Id3Tags' => __DIR__ . '/..' . '/shubhamjain/php-id3/PhpId3/Id3Tags.php',
|
||||
'PhpId3\\Id3TagsReader' => __DIR__ . '/..' . '/shubhamjain/php-id3/PhpId3/Id3TagsReader.php',
|
||||
'PhpId3\\Tests\\GenerateCvCommandTest' => __DIR__ . '/..' . '/shubhamjain/php-id3/Tests/Id3TagsReaderTest.php',
|
||||
'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php',
|
||||
'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php',
|
||||
'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php',
|
||||
|
@ -1474,6 +1457,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Smarty_Template_Source' => __DIR__ . '/..' . '/smarty/smarty/libs/sysplugins/smarty_template_source.php',
|
||||
'Smarty_Undefined_Variable' => __DIR__ . '/..' . '/smarty/smarty/libs/sysplugins/smarty_undefined_variable.php',
|
||||
'Smarty_Variable' => __DIR__ . '/..' . '/smarty/smarty/libs/sysplugins/smarty_variable.php',
|
||||
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php',
|
||||
|
@ -1484,6 +1468,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => __DIR__ . '/..' . '/symfony/options-resolver/OptionConfigurator.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php',
|
||||
'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php',
|
||||
|
@ -1507,15 +1492,12 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
|
||||
'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php',
|
||||
'TPC_yyStackEntry' => __DIR__ . '/..' . '/smarty/smarty/libs/sysplugins/smarty_internal_configfileparser.php',
|
||||
'TP_yyStackEntry' => __DIR__ . '/..' . '/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php',
|
||||
'Text_LanguageDetect' => __DIR__ . '/..' . '/pear/text_languagedetect/Text/LanguageDetect.php',
|
||||
'Text_LanguageDetect_Exception' => __DIR__ . '/..' . '/pear/text_languagedetect/Text/LanguageDetect/Exception.php',
|
||||
'Text_LanguageDetect_ISO639' => __DIR__ . '/..' . '/pear/text_languagedetect/Text/LanguageDetect/ISO639.php',
|
||||
'Text_LanguageDetect_Parser' => __DIR__ . '/..' . '/pear/text_languagedetect/Text/LanguageDetect/Parser.php',
|
||||
'URLify' => __DIR__ . '/..' . '/jbroadway/urlify/URLify.php',
|
||||
'URLifyTest' => __DIR__ . '/..' . '/jbroadway/urlify/tests/URLifyTest.php',
|
||||
'UploadHandler' => __DIR__ . '/..' . '/blueimp/jquery-file-upload/server/php/UploadHandler.php',
|
||||
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
||||
'Zotlabs\\Access\\AccessControl' => __DIR__ . '/../..' . '/Zotlabs/Access/AccessControl.php',
|
||||
'Zotlabs\\Access\\PermissionLimits' => __DIR__ . '/../..' . '/Zotlabs/Access/PermissionLimits.php',
|
||||
'Zotlabs\\Access\\PermissionRoles' => __DIR__ . '/../..' . '/Zotlabs/Access/PermissionRoles.php',
|
||||
|
@ -1545,6 +1527,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Zotlabs\\Daemon\\Onepoll' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Onepoll.php',
|
||||
'Zotlabs\\Daemon\\Poller' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Poller.php',
|
||||
'Zotlabs\\Daemon\\Queue' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Queue.php',
|
||||
'Zotlabs\\Daemon\\Run' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Run.php',
|
||||
'Zotlabs\\Daemon\\Thumbnail' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Thumbnail.php',
|
||||
'Zotlabs\\Daemon\\Xchan_photo' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Xchan_photo.php',
|
||||
'Zotlabs\\Extend\\Hook' => __DIR__ . '/../..' . '/Zotlabs/Extend/Hook.php',
|
||||
|
@ -1707,7 +1690,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Zotlabs\\Module\\Magic' => __DIR__ . '/../..' . '/Zotlabs/Module/Magic.php',
|
||||
'Zotlabs\\Module\\Manage' => __DIR__ . '/../..' . '/Zotlabs/Module/Manage.php',
|
||||
'Zotlabs\\Module\\Menu' => __DIR__ . '/../..' . '/Zotlabs/Module/Menu.php',
|
||||
'Zotlabs\\Module\\Message' => __DIR__ . '/../..' . '/Zotlabs/Module/Message.php',
|
||||
'Zotlabs\\Module\\Mitem' => __DIR__ . '/../..' . '/Zotlabs/Module/Mitem.php',
|
||||
'Zotlabs\\Module\\Moderate' => __DIR__ . '/../..' . '/Zotlabs/Module/Moderate.php',
|
||||
'Zotlabs\\Module\\Mood' => __DIR__ . '/../..' . '/Zotlabs/Module/Mood.php',
|
||||
|
@ -2069,6 +2051,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Zotlabs\\Update\\_1237' => __DIR__ . '/../..' . '/Zotlabs/Update/_1237.php',
|
||||
'Zotlabs\\Update\\_1238' => __DIR__ . '/../..' . '/Zotlabs/Update/_1238.php',
|
||||
'Zotlabs\\Update\\_1239' => __DIR__ . '/../..' . '/Zotlabs/Update/_1239.php',
|
||||
'Zotlabs\\Update\\_1240' => __DIR__ . '/../..' . '/Zotlabs/Update/_1240.php',
|
||||
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
'Zotlabs\\Web\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPSig.php',
|
||||
|
@ -2097,7 +2080,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Zotlabs\\Widget\\Clock' => __DIR__ . '/../..' . '/Zotlabs/Widget/Clock.php',
|
||||
'Zotlabs\\Widget\\Collections' => __DIR__ . '/../..' . '/Zotlabs/Widget/Collections.php',
|
||||
'Zotlabs\\Widget\\Common_friends' => __DIR__ . '/../..' . '/Zotlabs/Widget/Common_friends.php',
|
||||
'Zotlabs\\Widget\\Conversations' => __DIR__ . '/../..' . '/Zotlabs/Widget/Conversations.php',
|
||||
'Zotlabs\\Widget\\Cover_photo' => __DIR__ . '/../..' . '/Zotlabs/Widget/Cover_photo.php',
|
||||
'Zotlabs\\Widget\\Design_tools' => __DIR__ . '/../..' . '/Zotlabs/Widget/Design_tools.php',
|
||||
'Zotlabs\\Widget\\Dirsort' => __DIR__ . '/../..' . '/Zotlabs/Widget/Dirsort.php',
|
||||
|
@ -2139,7 +2121,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
|||
'Zotlabs\\Widget\\Vcard' => __DIR__ . '/../..' . '/Zotlabs/Widget/Vcard.php',
|
||||
'Zotlabs\\Widget\\Website_portation_tools' => __DIR__ . '/../..' . '/Zotlabs/Widget/Website_portation_tools.php',
|
||||
'Zotlabs\\Widget\\Zcard' => __DIR__ . '/../..' . '/Zotlabs/Widget/Zcard.php',
|
||||
'Zotlabs\\Zot6\\Finger' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Finger.php',
|
||||
'Zotlabs\\Zot6\\IHandler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/IHandler.php',
|
||||
'Zotlabs\\Zot6\\Receiver' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Receiver.php',
|
||||
'Zotlabs\\Zot6\\Zot6Handler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Zot6Handler.php',
|
||||
|
|
10
vendor/composer/include_paths.php
vendored
10
vendor/composer/include_paths.php
vendored
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
// include_paths.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
$vendorDir . '/pear/text_languagedetect',
|
||||
);
|
596
vendor/composer/installed.json
vendored
596
vendor/composer/installed.json
vendored
|
@ -164,35 +164,30 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/collections",
|
||||
"version": "1.6.4",
|
||||
"version_normalized": "1.6.4.0",
|
||||
"version": "1.6.5",
|
||||
"version_normalized": "1.6.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/collections.git",
|
||||
"reference": "6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7"
|
||||
"reference": "fc0206348e17e530d09463fef07ba8968406cd6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/collections/zipball/6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7",
|
||||
"reference": "6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7",
|
||||
"url": "https://api.github.com/repos/doctrine/collections/zipball/fc0206348e17e530d09463fef07ba8968406cd6d",
|
||||
"reference": "fc0206348e17e530d09463fef07ba8968406cd6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
"php": "^7.1.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^6.0",
|
||||
"phpstan/phpstan-shim": "^0.9.2",
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"vimeo/psalm": "^3.2.2"
|
||||
"vimeo/psalm": "^3.8.1"
|
||||
},
|
||||
"time": "2019-11-13T13:07:11+00:00",
|
||||
"time": "2020-05-25T19:24:35+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.6.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -232,21 +227,35 @@
|
|||
"collections",
|
||||
"iterators",
|
||||
"php"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpdoctrine",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.12.0",
|
||||
"version_normalized": "4.12.0.0",
|
||||
"version": "v4.13.0",
|
||||
"version_normalized": "4.13.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
||||
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -255,7 +264,7 @@
|
|||
"require-dev": {
|
||||
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
|
||||
},
|
||||
"time": "2019-10-28T03:44:26+00:00",
|
||||
"time": "2020-06-29T00:56:53+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -264,6 +273,9 @@
|
|||
},
|
||||
"files": [
|
||||
"library/HTMLPurifier.composer.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -334,17 +346,17 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.5.3",
|
||||
"version_normalized": "6.5.3.0",
|
||||
"version": "6.5.5",
|
||||
"version_normalized": "6.5.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e"
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e",
|
||||
"reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -352,7 +364,7 @@
|
|||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.6.1",
|
||||
"php": ">=5.5",
|
||||
"symfony/polyfill-intl-idn": "^1.11"
|
||||
"symfony/polyfill-intl-idn": "^1.17.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
|
@ -362,7 +374,7 @@
|
|||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"time": "2020-04-18T10:38:46+00:00",
|
||||
"time": "2020-06-16T21:01:06+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -601,28 +613,28 @@
|
|||
},
|
||||
{
|
||||
"name": "jbroadway/urlify",
|
||||
"version": "1.2.0-stable",
|
||||
"version_normalized": "1.2.0.0",
|
||||
"version": "1.2.2-stable",
|
||||
"version_normalized": "1.2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jbroadway/urlify.git",
|
||||
"reference": "b917c8c9274a9784a2eb30c657fc386ad591fdcd"
|
||||
"reference": "9b227e8548f16268cef55b5eb5d659a801fa824b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jbroadway/urlify/zipball/b917c8c9274a9784a2eb30c657fc386ad591fdcd",
|
||||
"reference": "b917c8c9274a9784a2eb30c657fc386ad591fdcd",
|
||||
"url": "https://api.github.com/repos/jbroadway/urlify/zipball/9b227e8548f16268cef55b5eb5d659a801fa824b",
|
||||
"reference": "9b227e8548f16268cef55b5eb5d659a801fa824b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"php": ">=7.2.0",
|
||||
"voku/portable-ascii": "^1.4",
|
||||
"voku/stop-words": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.0 || ~7.0"
|
||||
},
|
||||
"time": "2019-12-13T19:53:11+00:00",
|
||||
"time": "2020-06-14T17:15:34+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -710,17 +722,17 @@
|
|||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.67",
|
||||
"version_normalized": "1.0.67.0",
|
||||
"version": "1.0.69",
|
||||
"version_normalized": "1.0.69.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e"
|
||||
"reference": "7106f78428a344bc4f643c233a94e48795f10967"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e",
|
||||
"reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
|
||||
"reference": "7106f78428a344bc4f643c233a94e48795f10967",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -750,7 +762,7 @@
|
|||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||
},
|
||||
"time": "2020-04-16T13:21:26+00:00",
|
||||
"time": "2020-05-18T15:13:39+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -792,21 +804,27 @@
|
|||
"s3",
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://offset.earth/frankdejonge",
|
||||
"type": "other"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "league/html-to-markdown",
|
||||
"version": "4.9.1",
|
||||
"version_normalized": "4.9.1.0",
|
||||
"version": "4.10.0",
|
||||
"version_normalized": "4.10.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/html-to-markdown.git",
|
||||
"reference": "1dcd0f85de786f46a7f224a27cc3d709ddd2a68c"
|
||||
"reference": "0868ae7a552e809e5cd8f93ba022071640408e88"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/1dcd0f85de786f46a7f224a27cc3d709ddd2a68c",
|
||||
"reference": "1dcd0f85de786f46a7f224a27cc3d709ddd2a68c",
|
||||
"url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/0868ae7a552e809e5cd8f93ba022071640408e88",
|
||||
"reference": "0868ae7a552e809e5cd8f93ba022071640408e88",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -819,7 +837,7 @@
|
|||
"phpunit/phpunit": "^4.8|^5.7",
|
||||
"scrutinizer/ocular": "~1.1"
|
||||
},
|
||||
"time": "2019-12-28T01:32:28+00:00",
|
||||
"time": "2020-07-01T00:34:03+00:00",
|
||||
"bin": [
|
||||
"bin/html-to-markdown"
|
||||
],
|
||||
|
@ -858,6 +876,24 @@
|
|||
"keywords": [
|
||||
"html",
|
||||
"markdown"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.colinodell.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://www.paypal.me/colinpodell/10.00",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/colinodell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/colinodell",
|
||||
"type": "patreon"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1210,17 +1246,17 @@
|
|||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
"version": "2.7.0",
|
||||
"version_normalized": "2.7.0.0",
|
||||
"version": "2.7.3",
|
||||
"version_normalized": "2.7.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Masterminds/html5-php.git",
|
||||
"reference": "104443ad663d15981225f99532ba73c2f1d6b6f2"
|
||||
"reference": "aad73dbfefd71d46072138109ce1288d96c329cc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/104443ad663d15981225f99532ba73c2f1d6b6f2",
|
||||
"reference": "104443ad663d15981225f99532ba73c2f1d6b6f2",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/aad73dbfefd71d46072138109ce1288d96c329cc",
|
||||
"reference": "aad73dbfefd71d46072138109ce1288d96c329cc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1234,7 +1270,7 @@
|
|||
"sami/sami": "~2.0",
|
||||
"satooshi/php-coveralls": "1.0.*"
|
||||
},
|
||||
"time": "2019-07-25T07:03:26+00:00",
|
||||
"time": "2020-07-05T07:53:37+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1476,52 +1512,6 @@
|
|||
"random"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pear/text_languagedetect",
|
||||
"version": "v1.0.0",
|
||||
"version_normalized": "1.0.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pear/Text_LanguageDetect.git",
|
||||
"reference": "bb9ff6f4970f686fac59081e916b456021fe7ba6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pear/Text_LanguageDetect/zipball/bb9ff6f4970f686fac59081e916b456021fe7ba6",
|
||||
"reference": "bb9ff6f4970f686fac59081e916b456021fe7ba6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "May require the mbstring PHP extension"
|
||||
},
|
||||
"time": "2017-03-02T16:14:08+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Text": "./"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
"./"
|
||||
],
|
||||
"license": [
|
||||
"BSD-2-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicholas Pisarro",
|
||||
"email": "taak@php.net",
|
||||
"role": "Lead"
|
||||
}
|
||||
],
|
||||
"description": "Identify human languages from text samples",
|
||||
"homepage": "http://pear.php.net/package/Text_LanguageDetect"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
|
@ -2172,44 +2162,6 @@
|
|||
"xml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "shubhamjain/php-id3",
|
||||
"version": "dev-master",
|
||||
"version_normalized": "9999999-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/shubhamjain/PHP-ID3.git",
|
||||
"reference": "d4cae5c013097ee4ecc96693b935e9128ff51d3d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/shubhamjain/PHP-ID3/zipball/d4cae5c013097ee4ecc96693b935e9128ff51d3d",
|
||||
"reference": "d4cae5c013097ee4ecc96693b935e9128ff51d3d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2015-09-10T04:13:26+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "source",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"PhpId3": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Shubham Jain",
|
||||
"email": "shubham.jain.1@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A MP3 ID3 tags reader in native PHP"
|
||||
},
|
||||
{
|
||||
"name": "simshaun/recurr",
|
||||
"version": "v4.0.2",
|
||||
|
@ -2383,28 +2335,96 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v5.0.8",
|
||||
"version_normalized": "5.0.8.0",
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v2.1.3",
|
||||
"version_normalized": "2.1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1"
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
|
||||
"reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2020-04-06T10:40:56+00:00",
|
||||
"time": "2020-06-06T08:49:21+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
"dev-master": "2.1-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"function.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v5.1.2",
|
||||
"version_normalized": "5.1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "663f5dd5e14057d1954fe721f9709d35837f2447"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447",
|
||||
"reference": "663f5dd5e14057d1954fe721f9709d35837f2447",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
},
|
||||
"time": "2020-05-23T13:08:13+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2436,21 +2456,35 @@
|
|||
"config",
|
||||
"configuration",
|
||||
"options"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.15.0",
|
||||
"version_normalized": "1.15.0.0",
|
||||
"version": "v1.17.1",
|
||||
"version_normalized": "1.17.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2459,11 +2493,15 @@
|
|||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
"time": "2020-02-27T09:26:54+00:00",
|
||||
"time": "2020-06-06T08:46:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.17-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2496,21 +2534,35 @@
|
|||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.15.0",
|
||||
"version_normalized": "1.15.0.0",
|
||||
"version": "v1.17.1",
|
||||
"version_normalized": "1.17.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf"
|
||||
"reference": "a57f8161502549a742a63c09f0a604997bf47027"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
|
||||
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027",
|
||||
"reference": "a57f8161502549a742a63c09f0a604997bf47027",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2521,11 +2573,15 @@
|
|||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"time": "2020-03-09T19:04:49+00:00",
|
||||
"time": "2020-06-06T08:46:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.17-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2560,21 +2616,35 @@
|
|||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.15.0",
|
||||
"version_normalized": "1.15.0.0",
|
||||
"version": "v1.17.1",
|
||||
"version_normalized": "1.17.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
|
||||
"reference": "7110338d81ce1cbc3e273136e4574663627037a7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7",
|
||||
"reference": "7110338d81ce1cbc3e273136e4574663627037a7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2583,11 +2653,15 @@
|
|||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"time": "2020-03-09T19:04:49+00:00",
|
||||
"time": "2020-06-06T08:46:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.17-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2621,31 +2695,45 @@
|
|||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.15.0",
|
||||
"version_normalized": "1.15.0.0",
|
||||
"version": "v1.17.0",
|
||||
"version_normalized": "1.17.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
|
||||
"reference": "f048e612a3905f34931127360bdd2def19a5e582"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
|
||||
"reference": "f048e612a3905f34931127360bdd2def19a5e582",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2020-02-27T09:26:54+00:00",
|
||||
"time": "2020-05-12T16:47:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.17-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2678,31 +2766,128 @@
|
|||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.17.1",
|
||||
"version_normalized": "1.17.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2",
|
||||
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.8"
|
||||
},
|
||||
"time": "2020-06-06T08:46:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v5.0.8",
|
||||
"version_normalized": "5.0.8.0",
|
||||
"version": "v5.1.2",
|
||||
"version_normalized": "5.1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "3179f68dff5bad14d38c4114a1dab98030801fd7"
|
||||
"reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/3179f68dff5bad14d38c4114a1dab98030801fd7",
|
||||
"reference": "3179f68dff5bad14d38c4114a1dab98030801fd7",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1",
|
||||
"reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5"
|
||||
"php": ">=7.2.5",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
},
|
||||
"time": "2020-04-15T15:59:10+00:00",
|
||||
"time": "2020-05-30T20:35:19+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -2729,7 +2914,21 @@
|
|||
}
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com"
|
||||
"homepage": "https://symfony.com",
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "twbs/bootstrap",
|
||||
|
@ -2786,17 +2985,17 @@
|
|||
},
|
||||
{
|
||||
"name": "voku/portable-ascii",
|
||||
"version": "1.4.10",
|
||||
"version_normalized": "1.4.10.0",
|
||||
"version": "1.5.2",
|
||||
"version_normalized": "1.5.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/voku/portable-ascii.git",
|
||||
"reference": "240e93829a5f985fab0984a6e55ae5e26b78a334"
|
||||
"reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/voku/portable-ascii/zipball/240e93829a5f985fab0984a6e55ae5e26b78a334",
|
||||
"reference": "240e93829a5f985fab0984a6e55ae5e26b78a334",
|
||||
"url": "https://api.github.com/repos/voku/portable-ascii/zipball/618631dc601d8eb6ea0a9fbf654ec82f066c4e97",
|
||||
"reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2808,13 +3007,12 @@
|
|||
"suggest": {
|
||||
"ext-intl": "Use Intl for transliterator_transliterate() support"
|
||||
},
|
||||
"time": "2020-03-13T01:23:26+00:00",
|
||||
"time": "2020-06-15T23:49:30+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"voku\\": "src/voku/",
|
||||
"voku\\tests\\": "tests/"
|
||||
"voku\\": "src/voku/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -2833,6 +3031,24 @@
|
|||
"ascii",
|
||||
"clean",
|
||||
"php"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.me/moelleken",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/voku",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/voku",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii",
|
||||
"type": "tidelift"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
9
vendor/doctrine/collections/composer.json
vendored
9
vendor/doctrine/collections/composer.json
vendored
|
@ -18,13 +18,13 @@
|
|||
{"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
"php": "^7.1.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"doctrine/coding-standard": "^6.0",
|
||||
"phpstan/phpstan-shim": "^0.9.2",
|
||||
"vimeo/psalm": "^3.2.2"
|
||||
"vimeo/psalm": "^3.8.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" }
|
||||
|
@ -33,10 +33,5 @@
|
|||
"psr-4": {
|
||||
"Doctrine\\Tests\\": "tests/Doctrine/Tests"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.6.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use Closure;
|
|||
/**
|
||||
* Lazy collection that is backed by a concrete collection
|
||||
*
|
||||
* @phpstan-template TKey
|
||||
* @psalm-template TKey of array-key
|
||||
* @psalm-template T
|
||||
* @template-implements Collection<TKey,T>
|
||||
|
@ -284,6 +285,8 @@ abstract class AbstractLazyCollection implements Collection
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
|
@ -294,6 +297,12 @@ abstract class AbstractLazyCollection implements Collection
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param int|string $offset
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
|
@ -304,6 +313,10 @@ abstract class AbstractLazyCollection implements Collection
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
|
@ -313,6 +326,8 @@ abstract class AbstractLazyCollection implements Collection
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@ use function uasort;
|
|||
* serialize a collection use {@link toArray()} and reconstruct the collection
|
||||
* manually.
|
||||
*
|
||||
* @phpstan-template TKey
|
||||
* @psalm-template TKey of array-key
|
||||
* @psalm-template T
|
||||
* @template-implements Collection<TKey,T>
|
||||
|
@ -160,6 +161,8 @@ class ArrayCollection implements Collection, Selectable
|
|||
* Required by interface ArrayAccess.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
|
@ -170,6 +173,8 @@ class ArrayCollection implements Collection, Selectable
|
|||
* Required by interface ArrayAccess.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
|
@ -196,6 +201,8 @@ class ArrayCollection implements Collection, Selectable
|
|||
* Required by interface ArrayAccess.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-param TKey $offset
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
|
@ -282,6 +289,11 @@ class ArrayCollection implements Collection, Selectable
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-suppress InvalidPropertyAssignmentValue
|
||||
*
|
||||
* This breaks assumptions about the template type, but it would
|
||||
* be a backwards-incompatible change to remove this method
|
||||
*/
|
||||
public function add($element)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@ use IteratorAggregate;
|
|||
* position unless you explicitly positioned it before. Prefer iteration with
|
||||
* external iterators.
|
||||
*
|
||||
* @phpstan-template TKey
|
||||
* @psalm-template TKey of array-key
|
||||
* @psalm-template T
|
||||
* @template-extends IteratorAggregate<TKey, T>
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Doctrine\Common\Collections;
|
|||
* this API can implement efficient database access without having to ask the
|
||||
* EntityManager or Repositories.
|
||||
*
|
||||
* @phpstan-template TKey
|
||||
* @psalm-template TKey as array-key
|
||||
* @psalm-template T
|
||||
*/
|
||||
|
|
341
vendor/ezyang/htmlpurifier/INSTALL
vendored
341
vendor/ezyang/htmlpurifier/INSTALL
vendored
|
@ -1,341 +0,0 @@
|
|||
|
||||
Install
|
||||
How to install HTML Purifier
|
||||
|
||||
HTML Purifier is designed to run out of the box, so actually using the
|
||||
library is extremely easy. (Although... if you were looking for a
|
||||
step-by-step installation GUI, you've downloaded the wrong software!)
|
||||
|
||||
While the impatient can get going immediately with some of the sample
|
||||
code at the bottom of this library, it's well worth reading this entire
|
||||
document--most of the other documentation assumes that you are familiar
|
||||
with these contents.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
1. Compatibility
|
||||
|
||||
HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.3
|
||||
and up. It has no core dependencies with other libraries.
|
||||
|
||||
These optional extensions can enhance the capabilities of HTML Purifier:
|
||||
|
||||
* iconv : Converts text to and from non-UTF-8 encodings
|
||||
* bcmath : Used for unit conversion and imagecrash protection
|
||||
* tidy : Used for pretty-printing HTML
|
||||
|
||||
These optional libraries can enhance the capabilities of HTML Purifier:
|
||||
|
||||
* CSSTidy : Clean CSS stylesheets using %Core.ExtractStyleBlocks
|
||||
Note: You should use the modernized fork of CSSTidy available
|
||||
at https://github.com/Cerdic/CSSTidy
|
||||
* Net_IDNA2 (PEAR) : IRI support using %Core.EnableIDNA
|
||||
Note: This is not necessary for PHP 5.3 or later
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2. Reconnaissance
|
||||
|
||||
A big plus of HTML Purifier is its inerrant support of standards, so
|
||||
your web-pages should be standards-compliant. (They should also use
|
||||
semantic markup, but that's another issue altogether, one HTML Purifier
|
||||
cannot fix without reading your mind.)
|
||||
|
||||
HTML Purifier can process these doctypes:
|
||||
|
||||
* XHTML 1.0 Transitional (default)
|
||||
* XHTML 1.0 Strict
|
||||
* HTML 4.01 Transitional
|
||||
* HTML 4.01 Strict
|
||||
* XHTML 1.1
|
||||
|
||||
...and these character encodings:
|
||||
|
||||
* UTF-8 (default)
|
||||
* Any encoding iconv supports (with crippled internationalization support)
|
||||
|
||||
These defaults reflect what my choices would be if I were authoring an
|
||||
HTML document, however, what you choose depends on the nature of your
|
||||
codebase. If you don't know what doctype you are using, you can determine
|
||||
the doctype from this identifier at the top of your source code:
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
...and the character encoding from this code:
|
||||
|
||||
<meta http-equiv="Content-type" content="text/html;charset=ENCODING">
|
||||
|
||||
If the character encoding declaration is missing, STOP NOW, and
|
||||
read 'docs/enduser-utf8.html' (web accessible at
|
||||
http://htmlpurifier.org/docs/enduser-utf8.html). In fact, even if it is
|
||||
present, read this document anyway, as many websites specify their
|
||||
document's character encoding incorrectly.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
3. Including the library
|
||||
|
||||
The procedure is quite simple:
|
||||
|
||||
require_once '/path/to/library/HTMLPurifier.auto.php';
|
||||
|
||||
This will setup an autoloader, so the library's files are only included
|
||||
when you use them.
|
||||
|
||||
Only the contents in the library/ folder are necessary, so you can remove
|
||||
everything else when using HTML Purifier in a production environment.
|
||||
|
||||
If you installed HTML Purifier via PEAR, all you need to do is:
|
||||
|
||||
require_once 'HTMLPurifier.auto.php';
|
||||
|
||||
Please note that the usual PEAR practice of including just the classes you
|
||||
want will not work with HTML Purifier's autoloading scheme.
|
||||
|
||||
Advanced users, read on; other users can skip to section 4.
|
||||
|
||||
Autoload compatibility
|
||||
----------------------
|
||||
|
||||
HTML Purifier attempts to be as smart as possible when registering an
|
||||
autoloader, but there are some cases where you will need to change
|
||||
your own code to accomodate HTML Purifier. These are those cases:
|
||||
|
||||
AN __autoload FUNCTION IS DECLARED AFTER OUR AUTOLOADER IS REGISTERED
|
||||
spl_autoload_register() has the curious behavior of disabling
|
||||
the existing __autoload() handler. Users need to explicitly
|
||||
spl_autoload_register('__autoload'). Because we use SPL when it
|
||||
is available, __autoload() will ALWAYS be disabled. If __autoload()
|
||||
is declared before HTML Purifier is loaded, this is not a problem:
|
||||
HTML Purifier will register the function for you. But if it is
|
||||
declared afterwards, it will mysteriously not work. This
|
||||
snippet of code (after your autoloader is defined) will fix it:
|
||||
|
||||
spl_autoload_register('__autoload')
|
||||
|
||||
|
||||
For better performance
|
||||
----------------------
|
||||
|
||||
Opcode caches, which greatly speed up PHP initialization for scripts
|
||||
with large amounts of code (HTML Purifier included), don't like
|
||||
autoloaders. We offer an include file that includes all of HTML Purifier's
|
||||
files in one go in an opcode cache friendly manner:
|
||||
|
||||
// If /path/to/library isn't already in your include path, uncomment
|
||||
// the below line:
|
||||
// require '/path/to/library/HTMLPurifier.path.php';
|
||||
|
||||
require 'HTMLPurifier.includes.php';
|
||||
|
||||
Optional components still need to be included--you'll know if you try to
|
||||
use a feature and you get a class doesn't exists error! The autoloader
|
||||
can be used in conjunction with this approach to catch classes that are
|
||||
missing. Simply add this afterwards:
|
||||
|
||||
require 'HTMLPurifier.autoload.php';
|
||||
|
||||
Standalone version
|
||||
------------------
|
||||
|
||||
HTML Purifier has a standalone distribution; you can also generate
|
||||
a standalone file from the full version by running the script
|
||||
maintenance/generate-standalone.php . The standalone version has the
|
||||
benefit of having most of its code in one file, so parsing is much
|
||||
faster and the library is easier to manage.
|
||||
|
||||
If HTMLPurifier.standalone.php exists in the library directory, you
|
||||
can use it like this:
|
||||
|
||||
require '/path/to/HTMLPurifier.standalone.php';
|
||||
|
||||
This is equivalent to including HTMLPurifier.includes.php, except that
|
||||
the contents of standalone/ will be added to your path. To override this
|
||||
behavior, specify a new HTMLPURIFIER_PREFIX where standalone files can
|
||||
be found (usually, this will be one directory up, the "true" library
|
||||
directory in full distributions). Don't forget to set your path too!
|
||||
|
||||
The autoloader can be added to the end to ensure the classes are
|
||||
loaded when necessary; otherwise you can manually include them.
|
||||
To use the autoloader, use this:
|
||||
|
||||
require 'HTMLPurifier.autoload.php';
|
||||
|
||||
For advanced users
|
||||
------------------
|
||||
|
||||
HTMLPurifier.auto.php performs a number of operations that can be done
|
||||
individually. These are:
|
||||
|
||||
HTMLPurifier.path.php
|
||||
Puts /path/to/library in the include path. For high performance,
|
||||
this should be done in php.ini.
|
||||
|
||||
HTMLPurifier.autoload.php
|
||||
Registers our autoload handler HTMLPurifier_Bootstrap::autoload($class).
|
||||
|
||||
You can do these operations by yourself, if you like.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
4. Configuration
|
||||
|
||||
HTML Purifier is designed to run out-of-the-box, but occasionally HTML
|
||||
Purifier needs to be told what to do. If you answer no to any of these
|
||||
questions, read on; otherwise, you can skip to the next section (or, if you're
|
||||
into configuring things just for the heck of it, skip to 4.3).
|
||||
|
||||
* Am I using UTF-8?
|
||||
* Am I using XHTML 1.0 Transitional?
|
||||
|
||||
If you answered no to any of these questions, instantiate a configuration
|
||||
object and read on:
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
|
||||
|
||||
4.1. Setting a different character encoding
|
||||
|
||||
You really shouldn't use any other encoding except UTF-8, especially if you
|
||||
plan to support multilingual websites (read section three for more details).
|
||||
However, switching to UTF-8 is not always immediately feasible, so we can
|
||||
adapt.
|
||||
|
||||
HTML Purifier uses iconv to support other character encodings, as such,
|
||||
any encoding that iconv supports <http://www.gnu.org/software/libiconv/>
|
||||
HTML Purifier supports with this code:
|
||||
|
||||
$config->set('Core.Encoding', /* put your encoding here */);
|
||||
|
||||
An example usage for Latin-1 websites (the most common encoding for English
|
||||
websites):
|
||||
|
||||
$config->set('Core.Encoding', 'ISO-8859-1');
|
||||
|
||||
Note that HTML Purifier's support for non-Unicode encodings is crippled by the
|
||||
fact that any character not supported by that encoding will be silently
|
||||
dropped, EVEN if it is ampersand escaped. If you want to work around
|
||||
this, you are welcome to read docs/enduser-utf8.html for a fix,
|
||||
but please be cognizant of the issues the "solution" creates (for this
|
||||
reason, I do not include the solution in this document).
|
||||
|
||||
|
||||
4.2. Setting a different doctype
|
||||
|
||||
For those of you using HTML 4.01 Transitional, you can disable
|
||||
XHTML output like this:
|
||||
|
||||
$config->set('HTML.Doctype', 'HTML 4.01 Transitional');
|
||||
|
||||
Other supported doctypes include:
|
||||
|
||||
* HTML 4.01 Strict
|
||||
* HTML 4.01 Transitional
|
||||
* XHTML 1.0 Strict
|
||||
* XHTML 1.0 Transitional
|
||||
* XHTML 1.1
|
||||
|
||||
|
||||
4.3. Other settings
|
||||
|
||||
There are more configuration directives which can be read about
|
||||
here: <http://htmlpurifier.org/live/configdoc/plain.html> They're a bit boring,
|
||||
but they can help out for those of you who like to exert maximum control over
|
||||
your code. Some of the more interesting ones are configurable at the
|
||||
demo <http://htmlpurifier.org/demo.php> and are well worth looking into
|
||||
for your own system.
|
||||
|
||||
For example, you can fine tune allowed elements and attributes, convert
|
||||
relative URLs to absolute ones, and even autoparagraph input text! These
|
||||
are, respectively, %HTML.Allowed, %URI.MakeAbsolute and %URI.Base, and
|
||||
%AutoFormat.AutoParagraph. The %Namespace.Directive naming convention
|
||||
translates to:
|
||||
|
||||
$config->set('Namespace.Directive', $value);
|
||||
|
||||
E.g.
|
||||
|
||||
$config->set('HTML.Allowed', 'p,b,a[href],i');
|
||||
$config->set('URI.Base', 'http://www.example.com');
|
||||
$config->set('URI.MakeAbsolute', true);
|
||||
$config->set('AutoFormat.AutoParagraph', true);
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
5. Caching
|
||||
|
||||
HTML Purifier generates some cache files (generally one or two) to speed up
|
||||
its execution. For maximum performance, make sure that
|
||||
library/HTMLPurifier/DefinitionCache/Serializer is writeable by the webserver.
|
||||
|
||||
If you are in the library/ folder of HTML Purifier, you can set the
|
||||
appropriate permissions using:
|
||||
|
||||
chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer
|
||||
|
||||
If the above command doesn't work, you may need to assign write permissions
|
||||
to group:
|
||||
|
||||
chmod -R 0775 HTMLPurifier/DefinitionCache/Serializer
|
||||
|
||||
You can also chmod files via your FTP client; this option
|
||||
is usually accessible by right clicking the corresponding directory and
|
||||
then selecting "chmod" or "file permissions".
|
||||
|
||||
Starting with 2.0.1, HTML Purifier will generate friendly error messages
|
||||
that will tell you exactly what you have to chmod the directory to, if in doubt,
|
||||
follow its advice.
|
||||
|
||||
If you are unable or unwilling to give write permissions to the cache
|
||||
directory, you can either disable the cache (and suffer a performance
|
||||
hit):
|
||||
|
||||
$config->set('Core.DefinitionCache', null);
|
||||
|
||||
Or move the cache directory somewhere else (no trailing slash):
|
||||
|
||||
$config->set('Cache.SerializerPath', '/home/user/absolute/path');
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
6. Using the code
|
||||
|
||||
The interface is mind-numbingly simple:
|
||||
|
||||
$purifier = new HTMLPurifier($config);
|
||||
$clean_html = $purifier->purify( $dirty_html );
|
||||
|
||||
That's it! For more examples, check out docs/examples/ (they aren't very
|
||||
different though). Also, docs/enduser-slow.html gives advice on what to
|
||||
do if HTML Purifier is slowing down your application.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
7. Quick install
|
||||
|
||||
First, make sure library/HTMLPurifier/DefinitionCache/Serializer is
|
||||
writable by the webserver (see Section 5: Caching above for details).
|
||||
If your website is in UTF-8 and XHTML Transitional, use this code:
|
||||
|
||||
<?php
|
||||
require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$purifier = new HTMLPurifier($config);
|
||||
$clean_html = $purifier->purify($dirty_html);
|
||||
?>
|
||||
|
||||
If your website is in a different encoding or doctype, use this code:
|
||||
|
||||
<?php
|
||||
require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Core.Encoding', 'ISO-8859-1'); // replace with your encoding
|
||||
$config->set('HTML.Doctype', 'HTML 4.01 Transitional'); // replace with your doctype
|
||||
$purifier = new HTMLPurifier($config);
|
||||
|
||||
$clean_html = $purifier->purify($dirty_html);
|
||||
?>
|
||||
|
||||
vim: et sw=4 sts=4
|
60
vendor/ezyang/htmlpurifier/INSTALL.fr.utf8
vendored
60
vendor/ezyang/htmlpurifier/INSTALL.fr.utf8
vendored
|
@ -1,60 +0,0 @@
|
|||
|
||||
Installation
|
||||
Comment installer HTML Purifier
|
||||
|
||||
Attention : Ce document est encodé en UTF-8, si les lettres avec des accents
|
||||
ne s'affichent pas, prenez un meilleur éditeur de texte.
|
||||
|
||||
L'installation de HTML Purifier est très simple, parce qu'il n'a pas besoin
|
||||
de configuration. Pour les utilisateurs impatients, le code se trouve dans le
|
||||
pied de page, mais je recommande de lire le document.
|
||||
|
||||
1. Compatibilité
|
||||
|
||||
HTML Purifier fonctionne avec PHP 5. PHP 5.3 est la dernière version testée.
|
||||
Il ne dépend pas d'autres librairies.
|
||||
|
||||
Les extensions optionnelles sont iconv (généralement déjà installée) et tidy
|
||||
(répendue aussi). Si vous utilisez UTF-8 et que vous ne voulez pas l'indentation,
|
||||
vous pouvez utiliser HTML Purifier sans ces extensions.
|
||||
|
||||
|
||||
2. Inclure la librairie
|
||||
|
||||
Quand vous devez l'utilisez, incluez le :
|
||||
|
||||
require_once('/path/to/library/HTMLPurifier.auto.php');
|
||||
|
||||
Ne pas l'inclure si ce n'est pas nécessaire, car HTML Purifier est lourd.
|
||||
|
||||
HTML Purifier utilise "autoload". Si vous avez défini la fonction __autoload,
|
||||
vous devez ajouter cette fonction :
|
||||
|
||||
spl_autoload_register('__autoload')
|
||||
|
||||
Plus d'informations dans le document "INSTALL".
|
||||
|
||||
3. Installation rapide
|
||||
|
||||
Si votre site Web est en UTF-8 et XHTML Transitional, utilisez :
|
||||
|
||||
<?php
|
||||
require_once('/path/to/htmlpurifier/library/HTMLPurifier.auto.php');
|
||||
$purificateur = new HTMLPurifier();
|
||||
$html_propre = $purificateur->purify($html_a_purifier);
|
||||
?>
|
||||
|
||||
Sinon, utilisez :
|
||||
|
||||
<?php
|
||||
require_once('/path/to/html/purifier/library/HTMLPurifier.auto.load');
|
||||
$config = $HTMLPurifier_Config::createDefault();
|
||||
$config->set('Core', 'Encoding', 'ISO-8859-1'); //Remplacez par votre
|
||||
encodage
|
||||
$config->set('Core', 'XHTML', true); //Remplacer par false si HTML 4.01
|
||||
$purificateur = new HTMLPurifier($config);
|
||||
$html_propre = $purificateur->purify($html_a_purifier);
|
||||
?>
|
||||
|
||||
|
||||
vim: et sw=4 sts=4
|
1224
vendor/ezyang/htmlpurifier/NEWS
vendored
1224
vendor/ezyang/htmlpurifier/NEWS
vendored
File diff suppressed because it is too large
Load diff
150
vendor/ezyang/htmlpurifier/TODO
vendored
150
vendor/ezyang/htmlpurifier/TODO
vendored
|
@ -1,150 +0,0 @@
|
|||
|
||||
TODO List
|
||||
|
||||
= KEY ====================
|
||||
# Flagship
|
||||
- Regular
|
||||
? Maybe I'll Do It
|
||||
==========================
|
||||
|
||||
If no interest is expressed for a feature that may require a considerable
|
||||
amount of effort to implement, it may get endlessly delayed. Do not be
|
||||
afraid to cast your vote for the next feature to be implemented!
|
||||
|
||||
Things to do as soon as possible:
|
||||
|
||||
- http://htmlpurifier.org/phorum/read.php?3,5560,6307#msg-6307
|
||||
- Think about allowing explicit order of operations hooks for transforms
|
||||
- Fix "<.<" bug (trailing < is removed if not EOD)
|
||||
- Build in better internal state dumps and debugging tools for remote
|
||||
debugging
|
||||
- Allowed/Allowed* have strange interactions when both set
|
||||
? Transform lone embeds into object tags
|
||||
- Deprecated config options that emit warnings when you set them (with'
|
||||
a way of muting the warning if you really want to)
|
||||
- Make HTML.Trusted work with Output.FlashCompat
|
||||
- HTML.Trusted and HTML.SafeObject have funny interaction; general
|
||||
problem is what to do when a module "supersedes" another
|
||||
(see also tables and basic tables.) This is a little dicier
|
||||
because HTML.SafeObject has some extra functionality that
|
||||
trusted might find useful. See http://htmlpurifier.org/phorum/read.php?3,5762,6100
|
||||
|
||||
FUTURE VERSIONS
|
||||
---------------
|
||||
|
||||
4.9 release [OMG CONFIG PONIES]
|
||||
! Fix Printer. It's from the old days when we didn't have decent XML classes
|
||||
! Factor demo.php into a set of Printer classes, and then create a stub
|
||||
file for users here (inside the actual HTML Purifier library)
|
||||
- Fix error handling with form construction
|
||||
- Do encoding validation in Printers, or at least, where user data comes in
|
||||
- Config: Add examples to everything (make built-in which also automatically
|
||||
gives output)
|
||||
- Add "register" field to config schemas to eliminate dependence on
|
||||
naming conventions (try to remember why we ultimately decided on tihs)
|
||||
|
||||
5.0 release [HTML 5]
|
||||
# Swap out code to use html5lib tokenizer and tree-builder
|
||||
! Allow turning off of FixNesting and required attribute insertion
|
||||
|
||||
5.1 release [It's All About Trust] (floating)
|
||||
# Implement untrusted, dangerous elements/attributes
|
||||
# Implement IDREF support (harder than it seems, since you cannot have
|
||||
IDREFs to non-existent IDs)
|
||||
- Implement <area> (client and server side image maps are blocking
|
||||
on IDREF support)
|
||||
# Frameset XHTML 1.0 and HTML 4.01 doctypes
|
||||
- Figure out how to simultaneously set %CSS.Trusted and %HTML.Trusted (?)
|
||||
|
||||
5.2 release [Error'ed]
|
||||
# Error logging for filtering/cleanup procedures
|
||||
# Additional support for poorly written HTML
|
||||
- Microsoft Word HTML cleaning (i.e. MsoNormal, but research essential!)
|
||||
- Friendly strict handling of <address> (block -> <br>)
|
||||
- XSS-attempt detection--certain errors are flagged XSS-like
|
||||
- Append something to duplicate IDs so they're still usable (impl. note: the
|
||||
dupe detector would also need to detect the suffix as well)
|
||||
|
||||
6.0 release [Beyond HTML]
|
||||
# Legit token based CSS parsing (will require revamping almost every
|
||||
AttrDef class). Probably will use CSSTidy
|
||||
# More control over allowed CSS properties using a modularization
|
||||
# IRI support (this includes IDN)
|
||||
- Standardize token armor for all areas of processing
|
||||
|
||||
7.0 release [To XML and Beyond]
|
||||
- Extended HTML capabilities based on namespacing and tag transforms (COMPLEX)
|
||||
- Hooks for adding custom processors to custom namespaced tags and
|
||||
attributes, offer default implementation
|
||||
- Lots of documentation and samples
|
||||
|
||||
Ongoing
|
||||
- More refactoring to take advantage of PHP5's facilities
|
||||
- Refactor unit tests into lots of test methods
|
||||
- Plugins for major CMSes (COMPLEX)
|
||||
- phpBB
|
||||
- Also, a FAQ for extension writers with HTML Purifier
|
||||
|
||||
AutoFormat
|
||||
- Smileys
|
||||
- Syntax highlighting (with GeSHi) with <pre> and possibly <?php
|
||||
- Look at http://drupal.org/project/Modules/category/63 for ideas
|
||||
|
||||
Neat feature related
|
||||
! Support exporting configuration, so users can easily tweak settings
|
||||
in the demo, and then copy-paste into their own setup
|
||||
- Advanced URI filtering schemes (see docs/proposal-new-directives.txt)
|
||||
- Allow scoped="scoped" attribute in <style> tags; may be troublesome
|
||||
because regular CSS has no way of uniquely identifying nodes, so we'd
|
||||
have to generate IDs
|
||||
- Explain how to use HTML Purifier in non-PHP languages / create
|
||||
a simple command line stub (or complicated?)
|
||||
- Fixes for Firefox's inability to handle COL alignment props (Bug 915)
|
||||
- Automatically add non-breaking spaces to empty table cells when
|
||||
empty-cells:show is applied to have compatibility with Internet Explorer
|
||||
- Table of Contents generation (XHTML Compiler might be reusable). May also
|
||||
be out-of-band information.
|
||||
- Full set of color keywords. Also, a way to add onto them without
|
||||
finalizing the configuration object.
|
||||
- Write a var_export and memcached DefinitionCache - Denis
|
||||
- Built-in support for target="_blank" on all external links
|
||||
- Convert RTL/LTR override characters to <bdo> tags, or vice versa on demand.
|
||||
Also, enable disabling of directionality
|
||||
? Externalize inline CSS to promote clean HTML, proposed by Sander Tekelenburg
|
||||
? Remove redundant tags, ex. <u><u>Underlined</u></u>. Implementation notes:
|
||||
1. Analyzing which tags to remove duplicants
|
||||
2. Ensure attributes are merged into the parent tag
|
||||
3. Extend the tag exclusion system to specify whether or not the
|
||||
contents should be dropped or not (currently, there's code that could do
|
||||
something like this if it didn't drop the inner text too.)
|
||||
? Make AutoParagraph also support paragraph-izing double <br> tags, and not
|
||||
just double newlines. This is kind of tough to do in the current framework,
|
||||
though, and might be reasonably approximated by search replacing double <br>s
|
||||
with newlines before running it through HTML Purifier.
|
||||
|
||||
Maintenance related (slightly boring)
|
||||
# CHMOD install script for PEAR installs
|
||||
! Factor out command line parser into its own class, and unit test it
|
||||
- Reduce size of internal data-structures (esp. HTMLDefinition)
|
||||
- Allow merging configurations. Thus,
|
||||
a -> b -> default
|
||||
c -> d -> default
|
||||
becomes
|
||||
a -> b -> c -> d -> default
|
||||
Maybe allow more fine-grained tuning of this behavior. Alternatively,
|
||||
encourage people to use short plist depths before building them up.
|
||||
- Time PHPT tests
|
||||
|
||||
ChildDef related (very boring)
|
||||
- Abstract ChildDef_BlockQuote to work with all elements that only
|
||||
allow blocks in them, required or optional
|
||||
- Implement lenient <ruby> child validation
|
||||
|
||||
Wontfix
|
||||
- Non-lossy smart alternate character encoding transformations (unless
|
||||
patch provided)
|
||||
- Pretty-printing HTML: users can use Tidy on the output on entire page
|
||||
- Native content compression, whitespace stripping: use gzip if this is
|
||||
really important
|
||||
|
||||
vim: et sw=4 sts=4
|
2
vendor/ezyang/htmlpurifier/VERSION
vendored
2
vendor/ezyang/htmlpurifier/VERSION
vendored
|
@ -1 +1 @@
|
|||
4.12.0
|
||||
4.13.0
|
2
vendor/ezyang/htmlpurifier/WHATSNEW
vendored
2
vendor/ezyang/htmlpurifier/WHATSNEW
vendored
|
@ -1,2 +0,0 @@
|
|||
HTML Purifier 4.12.x is a maintenance release which makes
|
||||
compatibility fixes for PHP 7.4.
|
20
vendor/ezyang/htmlpurifier/WYSIWYG
vendored
20
vendor/ezyang/htmlpurifier/WYSIWYG
vendored
|
@ -1,20 +0,0 @@
|
|||
|
||||
WYSIWYG - What You See Is What You Get
|
||||
HTML Purifier: A Pretty Good Fit for TinyMCE and FCKeditor
|
||||
|
||||
Javascript-based WYSIWYG editors, simply stated, are quite amazing. But I've
|
||||
always been wary about using them due to security issues: they handle the
|
||||
client-side magic, but once you've been served a piping hot load of unfiltered
|
||||
HTML, what should be done then? In some situations, you can serve it uncleaned,
|
||||
since you only offer these facilities to trusted(?) authors.
|
||||
|
||||
Unfortunantely, for blog comments and anonymous input, BBCode, Textile and
|
||||
other markup languages still reign supreme. Put simply: filtering HTML is
|
||||
hard work, and these WYSIWYG authors don't offer anything to alleviate that
|
||||
trouble. Therein lies the solution:
|
||||
|
||||
HTML Purifier is perfect for filtering pure-HTML input from WYSIWYG editors.
|
||||
|
||||
Enough said.
|
||||
|
||||
vim: et sw=4 sts=4
|
5
vendor/ezyang/htmlpurifier/composer.json
vendored
5
vendor/ezyang/htmlpurifier/composer.json
vendored
|
@ -20,6 +20,9 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-0": { "HTMLPurifier": "library/" },
|
||||
"files": ["library/HTMLPurifier.composer.php"]
|
||||
"files": ["library/HTMLPurifier.composer.php"],
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Decorator/extender XSLT processor specifically for HTML documents.
|
||||
*/
|
||||
class ConfigDoc_HTMLXSLTProcessor
|
||||
{
|
||||
|
||||
/**
|
||||
* Instance of XSLTProcessor
|
||||
*/
|
||||
protected $xsltProcessor;
|
||||
|
||||
public function __construct($proc = false)
|
||||
{
|
||||
if ($proc === false) $proc = new XSLTProcessor();
|
||||
$this->xsltProcessor = $proc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @note Allows a string $xsl filename to be passed
|
||||
*/
|
||||
public function importStylesheet($xsl)
|
||||
{
|
||||
if (is_string($xsl)) {
|
||||
$xsl_file = $xsl;
|
||||
$xsl = new DOMDocument();
|
||||
$xsl->load($xsl_file);
|
||||
}
|
||||
return $this->xsltProcessor->importStylesheet($xsl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms an XML file into compatible XHTML based on the stylesheet
|
||||
* @param $xml XML DOM tree, or string filename
|
||||
* @return string HTML output
|
||||
* @todo Rename to transformToXHTML, as transformToHTML is misleading
|
||||
*/
|
||||
public function transformToHTML($xml)
|
||||
{
|
||||
if (is_string($xml)) {
|
||||
$dom = new DOMDocument();
|
||||
$dom->load($xml);
|
||||
} else {
|
||||
$dom = $xml;
|
||||
}
|
||||
$out = $this->xsltProcessor->transformToXML($dom);
|
||||
|
||||
// fudges for HTML backwards compatibility
|
||||
// assumes that document is XHTML
|
||||
$out = str_replace('/>', ' />', $out); // <br /> not <br/>
|
||||
$out = str_replace(' xmlns=""', '', $out); // rm unnecessary xmlns
|
||||
|
||||
if (class_exists('Tidy')) {
|
||||
// cleanup output
|
||||
$config = array(
|
||||
'indent' => true,
|
||||
'output-xhtml' => true,
|
||||
'wrap' => 80
|
||||
);
|
||||
$tidy = new Tidy;
|
||||
$tidy->parseString($out, $config, 'utf8');
|
||||
$tidy->cleanRepair();
|
||||
$out = (string) $tidy;
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bulk sets parameters for the XSL stylesheet
|
||||
* @param array $options Associative array of options to set
|
||||
*/
|
||||
public function setParameters($options)
|
||||
{
|
||||
foreach ($options as $name => $value) {
|
||||
$this->xsltProcessor->setParameter('', $name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Forward any other calls to the XSLT processor
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
call_user_func_array(array($this->xsltProcessor, $name), $arguments);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
164
vendor/ezyang/htmlpurifier/extras/FSTools.php
vendored
164
vendor/ezyang/htmlpurifier/extras/FSTools.php
vendored
|
@ -1,164 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Filesystem tools not provided by default; can recursively create, copy
|
||||
* and delete folders. Some template methods are provided for extensibility.
|
||||
*
|
||||
* @note This class must be instantiated to be used, although it does
|
||||
* not maintain state.
|
||||
*/
|
||||
class FSTools
|
||||
{
|
||||
|
||||
private static $singleton;
|
||||
|
||||
/**
|
||||
* Returns a global instance of FSTools
|
||||
*/
|
||||
public static function singleton()
|
||||
{
|
||||
if (empty(FSTools::$singleton)) FSTools::$singleton = new FSTools();
|
||||
return FSTools::$singleton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets our global singleton to something else; useful for overloading
|
||||
* functions.
|
||||
*/
|
||||
public static function setSingleton($singleton)
|
||||
{
|
||||
FSTools::$singleton = $singleton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively creates a directory
|
||||
* @param string $folder Name of folder to create
|
||||
* @note Adapted from the PHP manual comment 76612
|
||||
*/
|
||||
public function mkdirr($folder)
|
||||
{
|
||||
$folders = preg_split("#[\\\\/]#", $folder);
|
||||
$base = '';
|
||||
for($i = 0, $c = count($folders); $i < $c; $i++) {
|
||||
if(empty($folders[$i])) {
|
||||
if (!$i) {
|
||||
// special case for root level
|
||||
$base .= DIRECTORY_SEPARATOR;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$base .= $folders[$i];
|
||||
if(!is_dir($base)){
|
||||
$this->mkdir($base);
|
||||
}
|
||||
$base .= DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy a file, or recursively copy a folder and its contents; modified
|
||||
* so that copied files, if PHP, have includes removed
|
||||
* @note Adapted from http://aidanlister.com/repos/v/function.copyr.php
|
||||
*/
|
||||
public function copyr($source, $dest)
|
||||
{
|
||||
// Simple copy for a file
|
||||
if (is_file($source)) {
|
||||
return $this->copy($source, $dest);
|
||||
}
|
||||
// Make destination directory
|
||||
if (!is_dir($dest)) {
|
||||
$this->mkdir($dest);
|
||||
}
|
||||
// Loop through the folder
|
||||
$dir = $this->dir($source);
|
||||
while ( false !== ($entry = $dir->read()) ) {
|
||||
// Skip pointers
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
if (!$this->copyable($entry)) {
|
||||
continue;
|
||||
}
|
||||
// Deep copy directories
|
||||
if ($dest !== "$source/$entry") {
|
||||
$this->copyr("$source/$entry", "$dest/$entry");
|
||||
}
|
||||
}
|
||||
// Clean up
|
||||
$dir->close();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overloadable function that tests a filename for copyability. By
|
||||
* default, everything should be copied; you can restrict things to
|
||||
* ignore hidden files, unreadable files, etc. This function
|
||||
* applies to copyr().
|
||||
*/
|
||||
public function copyable($file)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a file, or a folder and its contents
|
||||
* @note Adapted from http://aidanlister.com/repos/v/function.rmdirr.php
|
||||
*/
|
||||
public function rmdirr($dirname)
|
||||
{
|
||||
// Sanity check
|
||||
if (!$this->file_exists($dirname)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Simple delete for a file
|
||||
if ($this->is_file($dirname) || $this->is_link($dirname)) {
|
||||
return $this->unlink($dirname);
|
||||
}
|
||||
|
||||
// Loop through the folder
|
||||
$dir = $this->dir($dirname);
|
||||
while (false !== $entry = $dir->read()) {
|
||||
// Skip pointers
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
// Recurse
|
||||
$this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry);
|
||||
}
|
||||
|
||||
// Clean up
|
||||
$dir->close();
|
||||
return $this->rmdir($dirname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively globs a directory.
|
||||
*/
|
||||
public function globr($dir, $pattern, $flags = NULL)
|
||||
{
|
||||
$files = $this->glob("$dir/$pattern", $flags);
|
||||
if ($files === false) $files = array();
|
||||
$sub_dirs = $this->glob("$dir/*", GLOB_ONLYDIR);
|
||||
if ($sub_dirs === false) $sub_dirs = array();
|
||||
foreach ($sub_dirs as $sub_dir) {
|
||||
$sub_files = $this->globr($sub_dir, $pattern, $flags);
|
||||
$files = array_merge($files, $sub_files);
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows for PHP functions to be called and be stubbed.
|
||||
* @warning This function will not work for functions that need
|
||||
* to pass references; manually define a stub function for those.
|
||||
*/
|
||||
public function __call($name, $args)
|
||||
{
|
||||
return call_user_func_array($name, $args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
141
vendor/ezyang/htmlpurifier/extras/FSTools/File.php
vendored
141
vendor/ezyang/htmlpurifier/extras/FSTools/File.php
vendored
|
@ -1,141 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Represents a file in the filesystem
|
||||
*
|
||||
* @warning Be sure to distinguish between get() and write() versus
|
||||
* read() and put(), the former operates on the entire file, while
|
||||
* the latter operates on a handle.
|
||||
*/
|
||||
class FSTools_File
|
||||
{
|
||||
|
||||
/** Filename of file this object represents */
|
||||
protected $name;
|
||||
|
||||
/** Handle for the file */
|
||||
protected $handle = false;
|
||||
|
||||
/** Instance of FSTools for interfacing with filesystem */
|
||||
protected $fs;
|
||||
|
||||
/**
|
||||
* Filename of file you wish to instantiate.
|
||||
* @note This file need not exist
|
||||
*/
|
||||
public function __construct($name, $fs = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->fs = $fs ? $fs : FSTools::singleton();
|
||||
}
|
||||
|
||||
/** Returns the filename of the file. */
|
||||
public function getName() {return $this->name;}
|
||||
|
||||
/** Returns directory of the file without trailing slash */
|
||||
public function getDirectory() {return $this->fs->dirname($this->name);}
|
||||
|
||||
/**
|
||||
* Retrieves the contents of a file
|
||||
* @todo Throw an exception if file doesn't exist
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return $this->fs->file_get_contents($this->name);
|
||||
}
|
||||
|
||||
/** Writes contents to a file, creates new file if necessary */
|
||||
public function write($contents)
|
||||
{
|
||||
return $this->fs->file_put_contents($this->name, $contents);
|
||||
}
|
||||
|
||||
/** Deletes the file */
|
||||
public function delete()
|
||||
{
|
||||
return $this->fs->unlink($this->name);
|
||||
}
|
||||
|
||||
/** Returns true if file exists and is a file. */
|
||||
public function exists()
|
||||
{
|
||||
return $this->fs->is_file($this->name);
|
||||
}
|
||||
|
||||
/** Returns last file modification time */
|
||||
public function getMTime()
|
||||
{
|
||||
return $this->fs->filemtime($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Chmod a file
|
||||
* @note We ignore errors because of some weird owner trickery due
|
||||
* to SVN duality
|
||||
*/
|
||||
public function chmod($octal_code)
|
||||
{
|
||||
return @$this->fs->chmod($this->name, $octal_code);
|
||||
}
|
||||
|
||||
/** Opens file's handle */
|
||||
public function open($mode)
|
||||
{
|
||||
if ($this->handle) $this->close();
|
||||
$this->handle = $this->fs->fopen($this->name, $mode);
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Closes file's handle */
|
||||
public function close()
|
||||
{
|
||||
if (!$this->handle) return false;
|
||||
$status = $this->fs->fclose($this->handle);
|
||||
$this->handle = false;
|
||||
return $status;
|
||||
}
|
||||
|
||||
/** Retrieves a line from an open file, with optional max length $length */
|
||||
public function getLine($length = null)
|
||||
{
|
||||
if (!$this->handle) $this->open('r');
|
||||
if ($length === null) return $this->fs->fgets($this->handle);
|
||||
else return $this->fs->fgets($this->handle, $length);
|
||||
}
|
||||
|
||||
/** Retrieves a character from an open file */
|
||||
public function getChar()
|
||||
{
|
||||
if (!$this->handle) $this->open('r');
|
||||
return $this->fs->fgetc($this->handle);
|
||||
}
|
||||
|
||||
/** Retrieves an $length bytes of data from an open data */
|
||||
public function read($length)
|
||||
{
|
||||
if (!$this->handle) $this->open('r');
|
||||
return $this->fs->fread($this->handle, $length);
|
||||
}
|
||||
|
||||
/** Writes to an open file */
|
||||
public function put($string)
|
||||
{
|
||||
if (!$this->handle) $this->open('a');
|
||||
return $this->fs->fwrite($this->handle, $string);
|
||||
}
|
||||
|
||||
/** Returns TRUE if the end of the file has been reached */
|
||||
public function eof()
|
||||
{
|
||||
if (!$this->handle) return true;
|
||||
return $this->fs->feof($this->handle);
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->handle) $this->close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This is a stub include that automatically configures the include path.
|
||||
*/
|
||||
|
||||
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );
|
||||
require_once 'HTMLPurifierExtras.php';
|
||||
require_once 'HTMLPurifierExtras.autoload.php';
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Legacy autoloader for systems lacking spl_autoload_register
|
||||
*
|
||||
* Must be separate to prevent deprecation warning on PHP 7.2
|
||||
*/
|
||||
|
||||
function __autoload($class)
|
||||
{
|
||||
return HTMLPurifierExtras::autoload($class);
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Convenience file that registers autoload handler for HTML Purifier.
|
||||
*
|
||||
* @warning
|
||||
* This autoloader does not contain the compatibility code seen in
|
||||
* HTMLPurifier_Bootstrap; the user is expected to make any necessary
|
||||
* changes to use this library.
|
||||
*/
|
||||
|
||||
if (function_exists('spl_autoload_register')) {
|
||||
spl_autoload_register(array('HTMLPurifierExtras', 'autoload'));
|
||||
if (function_exists('__autoload')) {
|
||||
// Be polite and ensure that userland autoload gets retained
|
||||
spl_autoload_register('__autoload');
|
||||
}
|
||||
} elseif (!function_exists('__autoload')) {
|
||||
require dirname(__FILE__) . '/HTMLPurifierExtras.autoload-legacy.php';
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Meta-class for HTML Purifier's extra class hierarchies, similar to
|
||||
* HTMLPurifier_Bootstrap.
|
||||
*/
|
||||
class HTMLPurifierExtras
|
||||
{
|
||||
|
||||
public static function autoload($class)
|
||||
{
|
||||
$path = HTMLPurifierExtras::getPath($class);
|
||||
if (!$path) return false;
|
||||
require $path;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function getPath($class)
|
||||
{
|
||||
if (
|
||||
strncmp('FSTools', $class, 7) !== 0 &&
|
||||
strncmp('ConfigDoc', $class, 9) !== 0
|
||||
) return false;
|
||||
// Custom implementations can go here
|
||||
// Standard implementation:
|
||||
return str_replace('_', '/', $class) . '.php';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
32
vendor/ezyang/htmlpurifier/extras/README
vendored
32
vendor/ezyang/htmlpurifier/extras/README
vendored
|
@ -1,32 +0,0 @@
|
|||
|
||||
HTML Purifier Extras
|
||||
The Method Behind The Madness!
|
||||
|
||||
The extras/ folder in HTML Purifier contains--you guessed it--extra things
|
||||
for HTML Purifier. Specifically, these are two extra libraries called
|
||||
FSTools and ConfigSchema. They're extra for a reason: you don't need them
|
||||
if you're using HTML Purifier for normal usage: filtering HTML. However,
|
||||
if you're a developer, and would like to test HTML Purifier, or need to
|
||||
use one of HTML Purifier's maintenance scripts, chances are they'll need
|
||||
these libraries. Who knows: maybe you'll find them useful too!
|
||||
|
||||
Here are the libraries:
|
||||
|
||||
|
||||
FSTools
|
||||
-------
|
||||
|
||||
Short for File System Tools, this is a poor-man's object-oriented wrapper for
|
||||
the filesystem. It currently consists of two classes:
|
||||
|
||||
- FSTools: This is a singleton that contains a manner of useful functions
|
||||
such as recursive glob, directory removal, etc, as well as the ability
|
||||
to call arbitrary native PHP functions through it like $FS->fopen(...).
|
||||
This makes it a lot simpler to mock these filesystem calls for unit testing.
|
||||
|
||||
- FSTools_File: This object represents a single file, and has almost any
|
||||
method imaginable one would need.
|
||||
|
||||
Check the files themselves for more information.
|
||||
|
||||
vim: et sw=4 sts=4
|
|
@ -7,7 +7,7 @@
|
|||
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
|
||||
* FILE, changes will be overwritten the next time the script is run.
|
||||
*
|
||||
* @version 4.12.0
|
||||
* @version 4.13.0
|
||||
*
|
||||
* @warning
|
||||
* You must *not* include any other HTML Purifier files before this file,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
HTML Purifier 4.12.0 - Standards Compliant HTML Filtering
|
||||
HTML Purifier 4.13.0 - Standards Compliant HTML Filtering
|
||||
Copyright (C) 2006-2008 Edward Z. Yang
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
@ -58,12 +58,12 @@ class HTMLPurifier
|
|||
* Version of HTML Purifier.
|
||||
* @type string
|
||||
*/
|
||||
public $version = '4.12.0';
|
||||
public $version = '4.13.0';
|
||||
|
||||
/**
|
||||
* Constant with version of HTML Purifier.
|
||||
*/
|
||||
const VERSION = '4.12.0';
|
||||
const VERSION = '4.13.0';
|
||||
|
||||
/**
|
||||
* Global configuration object.
|
||||
|
@ -240,6 +240,7 @@ class HTMLPurifier
|
|||
public function purifyArray($array_of_html, $config = null)
|
||||
{
|
||||
$context_array = array();
|
||||
$array = array();
|
||||
foreach($array_of_html as $key=>$value){
|
||||
if (is_array($value)) {
|
||||
$array[$key] = $this->purifyArray($value, $config);
|
||||
|
|
|
@ -69,7 +69,13 @@ class HTMLPurifier_AttrDef_CSS_Number extends HTMLPurifier_AttrDef
|
|||
return false;
|
||||
}
|
||||
|
||||
// Remove leading zeros until positive number or a zero stays left
|
||||
if (ltrim($left, '0') != '') {
|
||||
$left = ltrim($left, '0');
|
||||
} else {
|
||||
$left = '0';
|
||||
}
|
||||
|
||||
$right = rtrim($right, '0');
|
||||
|
||||
if ($right === '') {
|
||||
|
|
|
@ -21,7 +21,7 @@ class HTMLPurifier_Config
|
|||
* HTML Purifier's version
|
||||
* @type string
|
||||
*/
|
||||
public $version = '4.12.0';
|
||||
public $version = '4.13.0';
|
||||
|
||||
/**
|
||||
* Whether or not to automatically finalize
|
||||
|
@ -408,7 +408,7 @@ class HTMLPurifier_Config
|
|||
* maybeGetRawHTMLDefinition, which is more explicitly
|
||||
* named, instead.
|
||||
*
|
||||
* @return HTMLPurifier_HTMLDefinition
|
||||
* @return HTMLPurifier_HTMLDefinition|null
|
||||
*/
|
||||
public function getHTMLDefinition($raw = false, $optimized = false)
|
||||
{
|
||||
|
@ -427,7 +427,7 @@ class HTMLPurifier_Config
|
|||
* maybeGetRawCSSDefinition, which is more explicitly
|
||||
* named, instead.
|
||||
*
|
||||
* @return HTMLPurifier_CSSDefinition
|
||||
* @return HTMLPurifier_CSSDefinition|null
|
||||
*/
|
||||
public function getCSSDefinition($raw = false, $optimized = false)
|
||||
{
|
||||
|
@ -446,7 +446,7 @@ class HTMLPurifier_Config
|
|||
* maybeGetRawURIDefinition, which is more explicitly
|
||||
* named, instead.
|
||||
*
|
||||
* @return HTMLPurifier_URIDefinition
|
||||
* @return HTMLPurifier_URIDefinition|null
|
||||
*/
|
||||
public function getURIDefinition($raw = false, $optimized = false)
|
||||
{
|
||||
|
@ -468,7 +468,7 @@ class HTMLPurifier_Config
|
|||
* maybe semantics is the "right thing to do."
|
||||
*
|
||||
* @throws HTMLPurifier_Exception
|
||||
* @return HTMLPurifier_Definition
|
||||
* @return HTMLPurifier_Definition|null
|
||||
*/
|
||||
public function getDefinition($type, $raw = false, $optimized = false)
|
||||
{
|
||||
|
@ -647,7 +647,7 @@ class HTMLPurifier_Config
|
|||
}
|
||||
|
||||
/**
|
||||
* @return HTMLPurifier_HTMLDefinition
|
||||
* @return HTMLPurifier_HTMLDefinition|null
|
||||
*/
|
||||
public function maybeGetRawHTMLDefinition()
|
||||
{
|
||||
|
@ -655,7 +655,7 @@ class HTMLPurifier_Config
|
|||
}
|
||||
|
||||
/**
|
||||
* @return HTMLPurifier_CSSDefinition
|
||||
* @return HTMLPurifier_CSSDefinition|null
|
||||
*/
|
||||
public function maybeGetRawCSSDefinition()
|
||||
{
|
||||
|
@ -663,7 +663,7 @@ class HTMLPurifier_Config
|
|||
}
|
||||
|
||||
/**
|
||||
* @return HTMLPurifier_URIDefinition
|
||||
* @return HTMLPurifier_URIDefinition|null
|
||||
*/
|
||||
public function maybeGetRawURIDefinition()
|
||||
{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,10 @@ class HTMLPurifier_HTMLModule_Forms extends HTMLPurifier_HTMLModule
|
|||
*/
|
||||
public function setup($config)
|
||||
{
|
||||
if ($config->get('HTML.Forms')) {
|
||||
$this->safe = true;
|
||||
}
|
||||
|
||||
$form = $this->addElement(
|
||||
'form',
|
||||
'Form',
|
||||
|
|
|
@ -96,6 +96,7 @@ class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule
|
|||
|
||||
// @bgcolor for table, tr, td, th ---------------------------------
|
||||
$r['table@bgcolor'] =
|
||||
$r['tr@bgcolor'] =
|
||||
$r['td@bgcolor'] =
|
||||
$r['th@bgcolor'] =
|
||||
new HTMLPurifier_AttrTransform_BgColor();
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
// private class for unit testing
|
||||
|
||||
class HTMLPurifier_Language_en_x_test extends HTMLPurifier_Language
|
||||
{
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
// private language message file for unit testing purposes
|
||||
|
||||
$fallback = 'en';
|
||||
|
||||
$messages = array(
|
||||
'HTMLPurifier' => 'HTML Purifier X'
|
||||
);
|
||||
|
||||
$errorNames = array();
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
// private language message file for unit testing purposes
|
||||
// this language file has no class associated with it
|
||||
|
||||
$fallback = 'en';
|
||||
|
||||
$messages = array(
|
||||
'HTMLPurifier' => 'HTML Purifier XNone'
|
||||
);
|
||||
|
||||
$errorNames = array();
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -43,8 +43,8 @@ class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
|
|||
$ret .= $this->element('caption', 'Doctype');
|
||||
$ret .= $this->row('Name', $doctype->name);
|
||||
$ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No');
|
||||
$ret .= $this->row('Default Modules', implode($doctype->modules, ', '));
|
||||
$ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', '));
|
||||
$ret .= $this->row('Default Modules', implode(', ', $doctype->modules));
|
||||
$ret .= $this->row('Default Tidy Modules', implode(', ', $doctype->tidyModules));
|
||||
$ret .= $this->end('table');
|
||||
return $ret;
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
<IfModule !mod_authz_core.c>
|
||||
Deny from all
|
||||
</ifModule>
|
102
vendor/ezyang/htmlpurifier/maintenance/PH5P.patch
vendored
102
vendor/ezyang/htmlpurifier/maintenance/PH5P.patch
vendored
|
@ -1,102 +0,0 @@
|
|||
--- C:\Users\Edward\Webs\htmlpurifier\maintenance\PH5P.php 2008-07-07 09:12:12.000000000 -0400
|
||||
+++ C:\Users\Edward\Webs\htmlpurifier\maintenance/PH5P.new.php 2008-12-06 02:29:34.988800000 -0500
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
public function __construct($data) {
|
||||
$data = str_replace("\r\n", "\n", $data);
|
||||
- $date = str_replace("\r", null, $data);
|
||||
+ $data = str_replace("\r", null, $data);
|
||||
|
||||
$this->data = $data;
|
||||
$this->char = -1;
|
||||
@@ -211,7 +211,10 @@
|
||||
// If nothing is returned, emit a U+0026 AMPERSAND character token.
|
||||
// Otherwise, emit the character token that was returned.
|
||||
$char = (!$entity) ? '&' : $entity;
|
||||
- $this->emitToken($char);
|
||||
+ $this->emitToken(array(
|
||||
+ 'type' => self::CHARACTR,
|
||||
+ 'data' => $char
|
||||
+ ));
|
||||
|
||||
// Finally, switch to the data state.
|
||||
$this->state = 'data';
|
||||
@@ -708,7 +711,7 @@
|
||||
} elseif($char === '&') {
|
||||
/* U+0026 AMPERSAND (&)
|
||||
Switch to the entity in attribute value state. */
|
||||
- $this->entityInAttributeValueState('non');
|
||||
+ $this->entityInAttributeValueState();
|
||||
|
||||
} elseif($char === '>') {
|
||||
/* U+003E GREATER-THAN SIGN (>)
|
||||
@@ -738,7 +741,8 @@
|
||||
? '&'
|
||||
: $entity;
|
||||
|
||||
- $this->emitToken($char);
|
||||
+ $last = count($this->token['attr']) - 1;
|
||||
+ $this->token['attr'][$last]['value'] .= $char;
|
||||
}
|
||||
|
||||
private function bogusCommentState() {
|
||||
@@ -1066,6 +1070,11 @@
|
||||
$this->char++;
|
||||
|
||||
if(in_array($id, $this->entities)) {
|
||||
+ if ($e_name[$c-1] !== ';') {
|
||||
+ if ($c < $len && $e_name[$c] == ';') {
|
||||
+ $this->char++; // consume extra semicolon
|
||||
+ }
|
||||
+ }
|
||||
$entity = $id;
|
||||
break;
|
||||
}
|
||||
@@ -2084,7 +2093,7 @@
|
||||
/* Reconstruct the active formatting elements, if any. */
|
||||
$this->reconstructActiveFormattingElements();
|
||||
|
||||
- $this->insertElement($token);
|
||||
+ $this->insertElement($token, true, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -3465,7 +3474,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private function insertElement($token, $append = true) {
|
||||
+ private function insertElement($token, $append = true, $check = false) {
|
||||
+ // Proprietary workaround for libxml2's limitations with tag names
|
||||
+ if ($check) {
|
||||
+ // Slightly modified HTML5 tag-name modification,
|
||||
+ // removing anything that's not an ASCII letter, digit, or hyphen
|
||||
+ $token['name'] = preg_replace('/[^a-z0-9-]/i', '', $token['name']);
|
||||
+ // Remove leading hyphens and numbers
|
||||
+ $token['name'] = ltrim($token['name'], '-0..9');
|
||||
+ // In theory, this should ever be needed, but just in case
|
||||
+ if ($token['name'] === '') $token['name'] = 'span'; // arbitrary generic choice
|
||||
+ }
|
||||
+
|
||||
$el = $this->dom->createElement($token['name']);
|
||||
|
||||
foreach($token['attr'] as $attr) {
|
||||
@@ -3659,7 +3679,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private function generateImpliedEndTags(array $exclude = array()) {
|
||||
+ private function generateImpliedEndTags($exclude = array()) {
|
||||
/* When the steps below require the UA to generate implied end tags,
|
||||
then, if the current node is a dd element, a dt element, an li element,
|
||||
a p element, a td element, a th element, or a tr element, the UA must
|
||||
@@ -3673,7 +3693,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private function getElementCategory($name) {
|
||||
+ private function getElementCategory($node) {
|
||||
+ $name = $node->tagName;
|
||||
if(in_array($name, $this->special))
|
||||
return self::SPECIAL;
|
||||
|
3889
vendor/ezyang/htmlpurifier/maintenance/PH5P.php
vendored
3889
vendor/ezyang/htmlpurifier/maintenance/PH5P.php
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,130 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Adds vimline to files
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/..');
|
||||
$FS = new FSTools();
|
||||
|
||||
$vimline = 'vim: et sw=4 sts=4';
|
||||
|
||||
$files = $FS->globr('.', '*');
|
||||
foreach ($files as $file) {
|
||||
if (
|
||||
!is_file($file) ||
|
||||
prefix_is('./docs/doxygen', $file) ||
|
||||
prefix_is('./library/standalone', $file) ||
|
||||
prefix_is('./docs/specimens', $file) ||
|
||||
postfix_is('.ser', $file) ||
|
||||
postfix_is('.tgz', $file) ||
|
||||
postfix_is('.patch', $file) ||
|
||||
postfix_is('.dtd', $file) ||
|
||||
postfix_is('.ent', $file) ||
|
||||
postfix_is('.png', $file) ||
|
||||
postfix_is('.ico', $file) ||
|
||||
// wontfix
|
||||
postfix_is('.vtest', $file) ||
|
||||
postfix_is('.svg', $file) ||
|
||||
postfix_is('.phpt', $file) ||
|
||||
postfix_is('VERSION', $file) ||
|
||||
postfix_is('WHATSNEW', $file) ||
|
||||
postfix_is('configdoc/usage.xml', $file) ||
|
||||
postfix_is('library/HTMLPurifier.includes.php', $file) ||
|
||||
postfix_is('library/HTMLPurifier.safe-includes.php', $file) ||
|
||||
postfix_is('smoketests/xssAttacks.xml', $file) ||
|
||||
// phpt files
|
||||
postfix_is('.diff', $file) ||
|
||||
postfix_is('.exp', $file) ||
|
||||
postfix_is('.log', $file) ||
|
||||
postfix_is('.out', $file) ||
|
||||
|
||||
$file == './library/HTMLPurifier/Lexer/PH5P.php' ||
|
||||
$file == './maintenance/PH5P.php'
|
||||
) continue;
|
||||
$ext = strrchr($file, '.');
|
||||
if (
|
||||
postfix_is('README', $file) ||
|
||||
postfix_is('LICENSE', $file) ||
|
||||
postfix_is('CREDITS', $file) ||
|
||||
postfix_is('INSTALL', $file) ||
|
||||
postfix_is('NEWS', $file) ||
|
||||
postfix_is('TODO', $file) ||
|
||||
postfix_is('WYSIWYG', $file) ||
|
||||
postfix_is('Changelog', $file)
|
||||
) $ext = '.txt';
|
||||
if (postfix_is('Doxyfile', $file)) $ext = 'Doxyfile';
|
||||
if (postfix_is('.php.in', $file)) $ext = '.php';
|
||||
$no_nl = false;
|
||||
switch ($ext) {
|
||||
case '.php':
|
||||
case '.inc':
|
||||
case '.js':
|
||||
$line = '// %s';
|
||||
break;
|
||||
case '.html':
|
||||
case '.xsl':
|
||||
case '.xml':
|
||||
case '.htc':
|
||||
$line = "<!-- %s\n-->";
|
||||
break;
|
||||
case '.htmlt':
|
||||
$no_nl = true;
|
||||
$line = '--# %s';
|
||||
break;
|
||||
case '.ini':
|
||||
$line = '; %s';
|
||||
break;
|
||||
case '.css':
|
||||
$line = '/* %s */';
|
||||
break;
|
||||
case '.bat':
|
||||
$line = 'rem %s';
|
||||
break;
|
||||
case '.txt':
|
||||
case '.utf8':
|
||||
if (
|
||||
prefix_is('./library/HTMLPurifier/ConfigSchema', $file) ||
|
||||
prefix_is('./smoketests/test-schema', $file) ||
|
||||
prefix_is('./tests/HTMLPurifier/StringHashParser', $file)
|
||||
) {
|
||||
$no_nl = true;
|
||||
$line = '--# %s';
|
||||
} else {
|
||||
$line = ' %s';
|
||||
}
|
||||
break;
|
||||
case 'Doxyfile':
|
||||
$line = '# %s';
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Unknown file: ' . $file);
|
||||
}
|
||||
|
||||
echo "$file\n";
|
||||
$contents = file_get_contents($file);
|
||||
|
||||
$regex = '~' . str_replace('%s', 'vim: .+', preg_quote($line, '~')) . '~m';
|
||||
$contents = preg_replace($regex, '', $contents);
|
||||
|
||||
$contents = rtrim($contents);
|
||||
|
||||
if (strpos($contents, "\r\n") !== false) $nl = "\r\n";
|
||||
elseif (strpos($contents, "\n") !== false) $nl = "\n";
|
||||
elseif (strpos($contents, "\r") !== false) $nl = "\r";
|
||||
else $nl = PHP_EOL;
|
||||
|
||||
if (!$no_nl) $contents .= $nl;
|
||||
$contents .= $nl . str_replace('%s', $vimline, $line) . $nl;
|
||||
|
||||
file_put_contents($file, $contents);
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
function assertCli()
|
||||
{
|
||||
if (php_sapi_name() != 'cli' && !getenv('PHP_IS_CLI')) {
|
||||
echo 'Script cannot be called from web-browser (if you are indeed calling via cli,
|
||||
set environment variable PHP_IS_CLI to work around this).';
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
function prefix_is($comp, $subject)
|
||||
{
|
||||
return strncmp($comp, $subject, strlen($comp)) === 0;
|
||||
}
|
||||
|
||||
function postfix_is($comp, $subject)
|
||||
{
|
||||
return strlen($subject) < $comp ? false : substr($subject, -strlen($comp)) === $comp;
|
||||
}
|
||||
|
||||
// Load useful stuff like FSTools
|
||||
require_once dirname(__FILE__) . '/../extras/HTMLPurifierExtras.auto.php';
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd ..
|
||||
mkdir docs/doxygen
|
||||
rm -Rf docs/doxygen/*
|
||||
doxygen 1>docs/doxygen/info.log 2>docs/doxygen/errors.log
|
||||
if [ "$?" != 0 ]; then
|
||||
cat docs/doxygen/errors.log
|
||||
exit
|
||||
fi
|
||||
cd docs
|
||||
tar czf doxygen.tgz doxygen
|
|
@ -1,155 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
require_once '../library/HTMLPurifier.auto.php';
|
||||
assertCli();
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.2.2', '<')) {
|
||||
echo "This script requires PHP 5.2.2 or later, for tokenizer line numbers.";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Scans HTML Purifier source code for $config tokens and records the
|
||||
* directive being used; configdoc can use this info later.
|
||||
*
|
||||
* Currently, this just dumps all the info onto the console. Eventually, it
|
||||
* will create an XML file that our XSLT transform can use.
|
||||
*/
|
||||
|
||||
$FS = new FSTools();
|
||||
chdir(dirname(__FILE__) . '/../library/');
|
||||
$raw_files = $FS->globr('.', '*.php');
|
||||
$files = array();
|
||||
foreach ($raw_files as $file) {
|
||||
$file = substr($file, 2); // rm leading './'
|
||||
if (strncmp('standalone/', $file, 11) === 0) continue; // rm generated files
|
||||
if (substr_count($file, '.') > 1) continue; // rm meta files
|
||||
$files[] = $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the $i cursor to the next non-whitespace token
|
||||
*/
|
||||
function consumeWhitespace($tokens, &$i)
|
||||
{
|
||||
do {$i++;} while (is_array($tokens[$i]) && $tokens[$i][0] === T_WHITESPACE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests whether or not a token is a particular type. There are three run-cases:
|
||||
* - ($token, $expect_token): tests if the token is $expect_token type;
|
||||
* - ($token, $expect_value): tests if the token is the string $expect_value;
|
||||
* - ($token, $expect_token, $expect_value): tests if token is $expect_token type, and
|
||||
* its string representation is $expect_value
|
||||
*/
|
||||
function testToken($token, $value_or_token, $value = null)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_int($value_or_token)) return is_array($token) && $token[0] === $value_or_token;
|
||||
else return $token === $value_or_token;
|
||||
} else {
|
||||
return is_array($token) && $token[0] === $value_or_token && $token[1] === $value;
|
||||
}
|
||||
}
|
||||
|
||||
$counter = 0;
|
||||
$full_counter = 0;
|
||||
$tracker = array();
|
||||
|
||||
foreach ($files as $file) {
|
||||
$tokens = token_get_all(file_get_contents($file));
|
||||
$file = str_replace('\\', '/', $file);
|
||||
for ($i = 0, $c = count($tokens); $i < $c; $i++) {
|
||||
$ok = false;
|
||||
// Match $config
|
||||
if (!$ok && testToken($tokens[$i], T_VARIABLE, '$config')) $ok = true;
|
||||
// Match $this->config
|
||||
while (!$ok && testToken($tokens[$i], T_VARIABLE, '$this')) {
|
||||
consumeWhitespace($tokens, $i);
|
||||
if (!testToken($tokens[$i], T_OBJECT_OPERATOR)) break;
|
||||
consumeWhitespace($tokens, $i);
|
||||
if (testToken($tokens[$i], T_STRING, 'config')) $ok = true;
|
||||
break;
|
||||
}
|
||||
if (!$ok) continue;
|
||||
|
||||
$ok = false;
|
||||
for($i++; $i < $c; $i++) {
|
||||
if ($tokens[$i] === ',' || $tokens[$i] === ')' || $tokens[$i] === ';') {
|
||||
break;
|
||||
}
|
||||
if (is_string($tokens[$i])) continue;
|
||||
if ($tokens[$i][0] === T_OBJECT_OPERATOR) {
|
||||
$ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$ok) continue;
|
||||
|
||||
$line = $tokens[$i][2];
|
||||
|
||||
consumeWhitespace($tokens, $i);
|
||||
if (!testToken($tokens[$i], T_STRING, 'get')) continue;
|
||||
|
||||
consumeWhitespace($tokens, $i);
|
||||
if (!testToken($tokens[$i], '(')) continue;
|
||||
|
||||
$full_counter++;
|
||||
|
||||
$matched = false;
|
||||
do {
|
||||
|
||||
// What we currently don't match are batch retrievals, and
|
||||
// wildcard retrievals. This data might be useful in the future,
|
||||
// which is why we have a do {} while loop that doesn't actually
|
||||
// do anything.
|
||||
|
||||
consumeWhitespace($tokens, $i);
|
||||
if (!testToken($tokens[$i], T_CONSTANT_ENCAPSED_STRING)) continue;
|
||||
$id = substr($tokens[$i][1], 1, -1);
|
||||
|
||||
$counter++;
|
||||
$matched = true;
|
||||
|
||||
if (!isset($tracker[$id])) $tracker[$id] = array();
|
||||
if (!isset($tracker[$id][$file])) $tracker[$id][$file] = array();
|
||||
$tracker[$id][$file][] = $line;
|
||||
|
||||
} while (0);
|
||||
|
||||
//echo "$file:$line uses $namespace.$directive\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n$counter/$full_counter instances of \$config or \$this->config found in source code.\n";
|
||||
|
||||
echo "Generating XML... ";
|
||||
|
||||
$xw = new XMLWriter();
|
||||
$xw->openURI('../configdoc/usage.xml');
|
||||
$xw->setIndent(true);
|
||||
$xw->startDocument('1.0', 'UTF-8');
|
||||
$xw->startElement('usage');
|
||||
foreach ($tracker as $id => $files) {
|
||||
$xw->startElement('directive');
|
||||
$xw->writeAttribute('id', $id);
|
||||
foreach ($files as $file => $lines) {
|
||||
$xw->startElement('file');
|
||||
$xw->writeAttribute('name', $file);
|
||||
foreach ($lines as $line) {
|
||||
$xw->writeElement('line', $line);
|
||||
}
|
||||
$xw->endElement();
|
||||
}
|
||||
$xw->endElement();
|
||||
}
|
||||
$xw->endElement();
|
||||
$xw->flush();
|
||||
|
||||
echo "done!\n";
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Flushes the definition serial cache. This file should be
|
||||
* called if changes to any subclasses of HTMLPurifier_Definition
|
||||
* or related classes (such as HTMLPurifier_HTMLModule) are made. This
|
||||
* may also be necessary if you've modified a customized version.
|
||||
*
|
||||
* @param Accepts one argument, cache type to flush; otherwise flushes all
|
||||
* the caches.
|
||||
*/
|
||||
|
||||
echo "Flushing cache... \n";
|
||||
|
||||
require_once(dirname(__FILE__) . '/../library/HTMLPurifier.auto.php');
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
|
||||
$names = array('HTML', 'CSS', 'URI', 'Test');
|
||||
if (isset($argv[1])) {
|
||||
if (in_array($argv[1], $names)) {
|
||||
$names = array($argv[1]);
|
||||
} else {
|
||||
throw new Exception("Cache parameter {$argv[1]} is not a valid cache");
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($names as $name) {
|
||||
echo " - Flushing $name\n";
|
||||
$cache = new HTMLPurifier_DefinitionCache_Serializer($name);
|
||||
$cache->flush($config);
|
||||
}
|
||||
|
||||
echo "Cache flushed successfully.\n";
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
php "$DIR/generate-includes.php"
|
||||
php "$DIR/generate-schema-cache.php"
|
||||
php "$DIR/flush-definition-cache.php"
|
||||
php "$DIR/generate-standalone.php"
|
||||
php "$DIR/config-scanner.php"
|
|
@ -1,75 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Parses *.ent files into an entity lookup table, and then serializes and
|
||||
* writes the whole kaboodle to a file. The resulting file is cached so
|
||||
* that this script does not need to be run. This script should rarely,
|
||||
* if ever, be run, since HTML's entities are fairly immutable.
|
||||
*/
|
||||
|
||||
// here's where the entity files are located, assuming working directory
|
||||
// is the same as the location of this PHP file. Needs trailing slash.
|
||||
$entity_dir = '../docs/entities/';
|
||||
|
||||
// defines the output file for the serialized content.
|
||||
$output_file = '../library/HTMLPurifier/EntityLookup/entities.ser';
|
||||
|
||||
// courtesy of a PHP manual comment
|
||||
function unichr($dec)
|
||||
{
|
||||
if ($dec < 128) {
|
||||
$utf = chr($dec);
|
||||
} elseif ($dec < 2048) {
|
||||
$utf = chr(192 + (($dec - ($dec % 64)) / 64));
|
||||
$utf .= chr(128 + ($dec % 64));
|
||||
} else {
|
||||
$utf = chr(224 + (($dec - ($dec % 4096)) / 4096));
|
||||
$utf .= chr(128 + ((($dec % 4096) - ($dec % 64)) / 64));
|
||||
$utf .= chr(128 + ($dec % 64));
|
||||
}
|
||||
return $utf;
|
||||
}
|
||||
|
||||
if ( !is_dir($entity_dir) ) exit("Fatal Error: Can't find entity directory.\n");
|
||||
if ( file_exists($output_file) ) exit("Fatal Error: output file already exists.\n");
|
||||
|
||||
$dh = @opendir($entity_dir);
|
||||
if ( !$dh ) exit("Fatal Error: Cannot read entity directory.\n");
|
||||
|
||||
$entity_files = array();
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (@$file[0] === '.') continue;
|
||||
if (substr(strrchr($file, "."), 1) !== 'ent') continue;
|
||||
$entity_files[] = $file;
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
if ( !$entity_files ) exit("Fatal Error: No entity files to parse.\n");
|
||||
|
||||
$entity_table = array();
|
||||
$regexp = '/<!ENTITY\s+([A-Za-z0-9]+)\s+"&#(?:38;#)?([0-9]+);">/';
|
||||
|
||||
foreach ( $entity_files as $file ) {
|
||||
$contents = file_get_contents($entity_dir . $file);
|
||||
$matches = array();
|
||||
preg_match_all($regexp, $contents, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
$entity_table[$match[1]] = unichr($match[2]);
|
||||
}
|
||||
}
|
||||
|
||||
$output = serialize($entity_table);
|
||||
|
||||
$fh = fopen($output_file, 'w');
|
||||
fwrite($fh, $output);
|
||||
fclose($fh);
|
||||
|
||||
echo "Completed successfully.";
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,192 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
require_once '../tests/path2class.func.php';
|
||||
require_once '../library/HTMLPurifier/Bootstrap.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Generates an include stub for users who do not want to use the autoloader.
|
||||
* When new files are added to HTML Purifier's main codebase, this file should
|
||||
* be called.
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/../library/');
|
||||
$FS = new FSTools();
|
||||
|
||||
$exclude_dirs = array(
|
||||
'HTMLPurifier/Language/',
|
||||
'HTMLPurifier/ConfigSchema/',
|
||||
'HTMLPurifier/Filter/',
|
||||
'HTMLPurifier/Printer/',
|
||||
/* These should be excluded, but need to have ConfigSchema support first
|
||||
|
||||
*/
|
||||
);
|
||||
$exclude_files = array(
|
||||
'HTMLPurifier/Lexer/PEARSax3.php',
|
||||
'HTMLPurifier/Lexer/PH5P.php',
|
||||
'HTMLPurifier/Printer.php',
|
||||
);
|
||||
|
||||
// Determine what files need to be included:
|
||||
echo 'Scanning for files... ';
|
||||
$raw_files = $FS->globr('.', '*.php');
|
||||
if (!$raw_files) throw new Exception('Did not find any PHP source files');
|
||||
$files = array();
|
||||
foreach ($raw_files as $file) {
|
||||
$file = substr($file, 2); // rm leading './'
|
||||
if (strncmp('standalone/', $file, 11) === 0) continue; // rm generated files
|
||||
if (substr_count($file, '.') > 1) continue; // rm meta files
|
||||
$ok = true;
|
||||
foreach ($exclude_dirs as $dir) {
|
||||
if (strncmp($dir, $file, strlen($dir)) === 0) {
|
||||
$ok = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$ok) continue; // rm excluded directories
|
||||
if (in_array($file, $exclude_files)) continue; // rm excluded files
|
||||
$files[] = $file;
|
||||
}
|
||||
echo "done!\n";
|
||||
|
||||
// Reorder list so that dependencies are included first:
|
||||
|
||||
/**
|
||||
* Returns a lookup array of dependencies for a file.
|
||||
*
|
||||
* @note This function expects that format $name extends $parent on one line
|
||||
*
|
||||
* @param string $file
|
||||
* File to check dependencies of.
|
||||
* @return array
|
||||
* Lookup array of files the file is dependent on, sorted accordingly.
|
||||
*/
|
||||
function get_dependency_lookup($file)
|
||||
{
|
||||
static $cache = array();
|
||||
if (isset($cache[$file])) return $cache[$file];
|
||||
if (!file_exists($file)) {
|
||||
echo "File doesn't exist: $file\n";
|
||||
return array();
|
||||
}
|
||||
$fh = fopen($file, 'r');
|
||||
$deps = array();
|
||||
while (!feof($fh)) {
|
||||
$line = fgets($fh);
|
||||
if (strncmp('class', $line, 5) === 0) {
|
||||
// The implementation here is fragile and will break if we attempt
|
||||
// to use interfaces. Beware!
|
||||
$arr = explode(' extends ', trim($line, ' {'."\n\r"), 2);
|
||||
if (count($arr) < 2) break;
|
||||
$parent = $arr[1];
|
||||
$dep_file = HTMLPurifier_Bootstrap::getPath($parent);
|
||||
if (!$dep_file) break;
|
||||
$deps[$dep_file] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose($fh);
|
||||
foreach (array_keys($deps) as $file) {
|
||||
// Extra dependencies must come *before* base dependencies
|
||||
$deps = get_dependency_lookup($file) + $deps;
|
||||
}
|
||||
$cache[$file] = $deps;
|
||||
return $deps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts files based on dependencies. This function is lazy and will not
|
||||
* group files with dependencies together; it will merely ensure that a file
|
||||
* is never included before its dependencies are.
|
||||
*
|
||||
* @param $files
|
||||
* Files array to sort.
|
||||
* @return
|
||||
* Sorted array ($files is not modified by reference!)
|
||||
*/
|
||||
function dep_sort($files)
|
||||
{
|
||||
$ret = array();
|
||||
$cache = array();
|
||||
foreach ($files as $file) {
|
||||
if (isset($cache[$file])) continue;
|
||||
$deps = get_dependency_lookup($file);
|
||||
foreach (array_keys($deps) as $dep) {
|
||||
if (!isset($cache[$dep])) {
|
||||
$ret[] = $dep;
|
||||
$cache[$dep] = true;
|
||||
}
|
||||
}
|
||||
$cache[$file] = true;
|
||||
$ret[] = $file;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$files = dep_sort($files);
|
||||
|
||||
// Build the actual include stub:
|
||||
|
||||
$version = trim(file_get_contents('../VERSION'));
|
||||
|
||||
// stub
|
||||
$php = "<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file was auto-generated by generate-includes.php and includes all of
|
||||
* the core files required by HTML Purifier. Use this if performance is a
|
||||
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
|
||||
* FILE, changes will be overwritten the next time the script is run.
|
||||
*
|
||||
* @version $version
|
||||
*
|
||||
* @warning
|
||||
* You must *not* include any other HTML Purifier files before this file,
|
||||
* because 'require' not 'require_once' is used.
|
||||
*
|
||||
* @warning
|
||||
* This file requires that the include path contains the HTML Purifier
|
||||
* library directory; this is not auto-set.
|
||||
*/
|
||||
|
||||
";
|
||||
|
||||
foreach ($files as $file) {
|
||||
$php .= "require '$file';" . PHP_EOL;
|
||||
}
|
||||
|
||||
echo "Writing HTMLPurifier.includes.php... ";
|
||||
file_put_contents('HTMLPurifier.includes.php', $php);
|
||||
echo "done!\n";
|
||||
|
||||
$php = "<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file was auto-generated by generate-includes.php and includes all of
|
||||
* the core files required by HTML Purifier. This is a convenience stub that
|
||||
* includes all files using dirname(__FILE__) and require_once. PLEASE DO NOT
|
||||
* EDIT THIS FILE, changes will be overwritten the next time the script is run.
|
||||
*
|
||||
* Changes to include_path are not necessary.
|
||||
*/
|
||||
|
||||
\$__dir = dirname(__FILE__);
|
||||
|
||||
";
|
||||
|
||||
foreach ($files as $file) {
|
||||
$php .= "require_once \$__dir . '/$file';" . PHP_EOL;
|
||||
}
|
||||
|
||||
echo "Writing HTMLPurifier.safe-includes.php... ";
|
||||
file_put_contents('HTMLPurifier.safe-includes.php', $php);
|
||||
echo "done!\n";
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file compares our version of PH5P with Jero's original version, and
|
||||
* generates a patch of the differences. This script should be run whenever
|
||||
* library/HTMLPurifier/Lexer/PH5P.php is modified.
|
||||
*/
|
||||
|
||||
$orig = realpath(dirname(__FILE__) . '/PH5P.php');
|
||||
$new = realpath(dirname(__FILE__) . '/../library/HTMLPurifier/Lexer/PH5P.php');
|
||||
$newt = dirname(__FILE__) . '/PH5P.new.php'; // temporary file
|
||||
|
||||
// minor text-processing of new file to get into same format as original
|
||||
$new_src = file_get_contents($new);
|
||||
$new_src = '<?php' . PHP_EOL . substr($new_src, strpos($new_src, 'class HTML5 {'));
|
||||
|
||||
file_put_contents($newt, $new_src);
|
||||
shell_exec("diff -u \"$orig\" \"$newt\" > PH5P.patch");
|
||||
unlink($newt);
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/common.php';
|
||||
require_once dirname(__FILE__) . '/../library/HTMLPurifier.auto.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Generates a schema cache file, saving it to
|
||||
* library/HTMLPurifier/ConfigSchema/schema.ser.
|
||||
*
|
||||
* This should be run when new configuration options are added to
|
||||
* HTML Purifier. A cached version is available via the repository
|
||||
* so this does not normally have to be regenerated.
|
||||
*
|
||||
* If you have a directory containing custom configuration schema files,
|
||||
* you can simple add a path to that directory as a parameter to
|
||||
* this, and they will get included.
|
||||
*/
|
||||
|
||||
$target = dirname(__FILE__) . '/../library/HTMLPurifier/ConfigSchema/schema.ser';
|
||||
|
||||
$builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder();
|
||||
$interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
||||
|
||||
$builder->buildDir($interchange);
|
||||
|
||||
$loader = dirname(__FILE__) . '/../config-schema.php';
|
||||
if (file_exists($loader)) include $loader;
|
||||
foreach ($_SERVER['argv'] as $i => $dir) {
|
||||
if ($i === 0) continue;
|
||||
$builder->buildDir($interchange, realpath($dir));
|
||||
}
|
||||
|
||||
$interchange->validate();
|
||||
|
||||
$schema_builder = new HTMLPurifier_ConfigSchema_Builder_ConfigSchema();
|
||||
$schema = $schema_builder->build($interchange);
|
||||
|
||||
echo "Saving schema... ";
|
||||
file_put_contents($target, serialize($schema));
|
||||
echo "done!\n";
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,159 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Compiles all of HTML Purifier's library files into one big file
|
||||
* named HTMLPurifier.standalone.php. This is usually called during the
|
||||
* release process.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Global hash that tracks already loaded includes
|
||||
*/
|
||||
$GLOBALS['loaded'] = array();
|
||||
|
||||
/**
|
||||
* Custom FSTools for this script that overloads some behavior
|
||||
* @warning The overloading of copy() is not necessarily global for
|
||||
* this script. Watch out!
|
||||
*/
|
||||
class MergeLibraryFSTools extends FSTools
|
||||
{
|
||||
public function copyable($entry)
|
||||
{
|
||||
// Skip hidden files
|
||||
if ($entry[0] == '.') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public function copy($source, $dest)
|
||||
{
|
||||
copy_and_remove_includes($source, $dest);
|
||||
}
|
||||
}
|
||||
$FS = new MergeLibraryFSTools();
|
||||
|
||||
/**
|
||||
* Replaces the includes inside PHP source code with the corresponding
|
||||
* source.
|
||||
* @param string $text PHP source code to replace includes from
|
||||
*/
|
||||
function replace_includes($text)
|
||||
{
|
||||
// also remove vim modelines
|
||||
return preg_replace_callback(
|
||||
"/require(?:_once)? ['\"]([^'\"]+)['\"];/",
|
||||
'replace_includes_callback',
|
||||
$text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes leading PHP tags from included files. Assumes that there is
|
||||
* no trailing tag. Also removes vim modelines.
|
||||
* @note This is safe for files that have internal <?php
|
||||
* @param string $text Text to have leading PHP tag from
|
||||
*/
|
||||
function remove_php_tags($text)
|
||||
{
|
||||
$text = preg_replace('#// vim:.+#', '', $text);
|
||||
return substr($text, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the contents of a directory to the standalone directory
|
||||
* @param string $dir Directory to copy
|
||||
*/
|
||||
function make_dir_standalone($dir)
|
||||
{
|
||||
global $FS;
|
||||
return $FS->copyr($dir, 'standalone/' . $dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the contents of a file to the standalone directory
|
||||
* @param string $file File to copy
|
||||
*/
|
||||
function make_file_standalone($file)
|
||||
{
|
||||
global $FS;
|
||||
$FS->mkdirr('standalone/' . dirname($file));
|
||||
copy_and_remove_includes($file, 'standalone/' . $file);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies a file to another location recursively, if it is a PHP file
|
||||
* remove includes
|
||||
* @param string $file Original file
|
||||
* @param string $sfile New location of file
|
||||
*/
|
||||
function copy_and_remove_includes($file, $sfile)
|
||||
{
|
||||
$contents = file_get_contents($file);
|
||||
if (strrchr($file, '.') === '.php') $contents = replace_includes($contents);
|
||||
return file_put_contents($sfile, $contents);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $matches preg_replace_callback matches array, where index 1
|
||||
* is the filename to include
|
||||
*/
|
||||
function replace_includes_callback($matches)
|
||||
{
|
||||
$file = $matches[1];
|
||||
$preserve = array(
|
||||
// PEAR (external)
|
||||
'XML/HTMLSax3.php' => 1
|
||||
);
|
||||
if (isset($preserve[$file])) {
|
||||
return $matches[0];
|
||||
}
|
||||
if (isset($GLOBALS['loaded'][$file])) return '';
|
||||
$GLOBALS['loaded'][$file] = true;
|
||||
return replace_includes(remove_php_tags(file_get_contents($file)));
|
||||
}
|
||||
|
||||
echo 'Generating includes file... ';
|
||||
shell_exec('php generate-includes.php');
|
||||
echo "done!\n";
|
||||
|
||||
chdir(dirname(__FILE__) . '/../library/');
|
||||
|
||||
echo 'Creating full file...';
|
||||
$contents = replace_includes(file_get_contents('HTMLPurifier.includes.php'));
|
||||
$contents = str_replace(
|
||||
// Note that bootstrap is now inside the standalone file
|
||||
"define('HTMLPURIFIER_PREFIX', realpath(dirname(__FILE__) . '/..'));",
|
||||
"define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone');
|
||||
set_include_path(HTMLPURIFIER_PREFIX . PATH_SEPARATOR . get_include_path());",
|
||||
$contents
|
||||
);
|
||||
file_put_contents('HTMLPurifier.standalone.php', $contents);
|
||||
echo ' done!' . PHP_EOL;
|
||||
|
||||
echo 'Creating standalone directory...';
|
||||
$FS->rmdirr('standalone'); // ensure a clean copy
|
||||
|
||||
// data files
|
||||
$FS->mkdirr('standalone/HTMLPurifier/DefinitionCache/Serializer');
|
||||
make_file_standalone('HTMLPurifier/EntityLookup/entities.ser');
|
||||
make_file_standalone('HTMLPurifier/ConfigSchema/schema.ser');
|
||||
|
||||
// non-standard inclusion setup
|
||||
make_dir_standalone('HTMLPurifier/ConfigSchema');
|
||||
make_dir_standalone('HTMLPurifier/Language');
|
||||
make_dir_standalone('HTMLPurifier/Filter');
|
||||
make_dir_standalone('HTMLPurifier/Printer');
|
||||
make_file_standalone('HTMLPurifier/Printer.php');
|
||||
make_file_standalone('HTMLPurifier/Lexer/PH5P.php');
|
||||
|
||||
echo ' done!' . PHP_EOL;
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Deprecated in favor of generate-standalone.php.
|
||||
*/
|
||||
|
||||
require dirname(__FILE__) . '/generate-standalone.php';
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,71 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
echo "Please do not run this script. It is here for historical purposes only.";
|
||||
exit;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Extracts all definitions inside a configuration schema
|
||||
* (HTMLPurifier_ConfigSchema) and exports them as plain text files.
|
||||
*
|
||||
* @todo Extract version numbers.
|
||||
*/
|
||||
|
||||
define('HTMLPURIFIER_SCHEMA_STRICT', true); // description data needs to be collected
|
||||
require_once dirname(__FILE__) . '/../library/HTMLPurifier.auto.php';
|
||||
|
||||
// We need includes to ensure all HTMLPurifier_ConfigSchema calls are
|
||||
// performed.
|
||||
require_once 'HTMLPurifier.includes.php';
|
||||
|
||||
// Also, these extra files will be necessary.
|
||||
require_once 'HTMLPurifier/Filter/ExtractStyleBlocks.php';
|
||||
|
||||
/**
|
||||
* Takes a hash and saves its contents to library/HTMLPurifier/ConfigSchema/
|
||||
*/
|
||||
function saveHash($hash)
|
||||
{
|
||||
if ($hash === false) return;
|
||||
$dir = realpath(dirname(__FILE__) . '/../library/HTMLPurifier/ConfigSchema');
|
||||
$name = $hash['ID'] . '.txt';
|
||||
$file = $dir . '/' . $name;
|
||||
if (file_exists($file)) {
|
||||
trigger_error("File already exists; skipped $name");
|
||||
return;
|
||||
}
|
||||
$file = new FSTools_File($file);
|
||||
$file->open('w');
|
||||
$multiline = false;
|
||||
foreach ($hash as $key => $value) {
|
||||
$multiline = $multiline || (strpos($value, "\n") !== false);
|
||||
if ($multiline) {
|
||||
$file->put("--$key--" . PHP_EOL);
|
||||
$file->put(str_replace("\n", PHP_EOL, $value) . PHP_EOL);
|
||||
} else {
|
||||
if ($key == 'ID') {
|
||||
$file->put("$value" . PHP_EOL);
|
||||
} else {
|
||||
$file->put("$key: $value" . PHP_EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
$file->close();
|
||||
}
|
||||
|
||||
$schema = HTMLPurifier_ConfigSchema::instance();
|
||||
$adapter = new HTMLPurifier_ConfigSchema_StringHashReverseAdapter($schema);
|
||||
|
||||
foreach ($schema->info as $ns => $ns_array) {
|
||||
saveHash($adapter->get($ns));
|
||||
foreach ($ns_array as $dir => $x) {
|
||||
saveHash($adapter->get($ns, $dir));
|
||||
}
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
echo "Please do not run this script. It is here for historical purposes only.";
|
||||
exit;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Removes leading includes from files.
|
||||
*
|
||||
* @note
|
||||
* This does not remove inline includes; those must be handled manually.
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/../tests/HTMLPurifier');
|
||||
$FS = new FSTools();
|
||||
|
||||
$files = $FS->globr('.', '*.php');
|
||||
foreach ($files as $file) {
|
||||
if (substr_count(basename($file), '.') > 1) continue;
|
||||
$old_code = file_get_contents($file);
|
||||
$new_code = preg_replace("#^require_once .+[\n\r]*#m", '', $old_code);
|
||||
if ($old_code !== $new_code) {
|
||||
file_put_contents($file, $new_code);
|
||||
}
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
echo "Please do not run this script. It is here for historical purposes only.";
|
||||
exit;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Removes ConfigSchema function calls from source files.
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/../library/');
|
||||
$FS = new FSTools();
|
||||
|
||||
$files = $FS->globr('.', '*.php');
|
||||
foreach ($files as $file) {
|
||||
if (substr_count(basename($file), '.') > 1) continue;
|
||||
$old_code = file_get_contents($file);
|
||||
$new_code = preg_replace("#^HTMLPurifier_ConfigSchema::.+?\);[\n\r]*#ms", '', $old_code);
|
||||
if ($old_code !== $new_code) {
|
||||
file_put_contents($file, $new_code);
|
||||
}
|
||||
if (preg_match('#^\s+HTMLPurifier_ConfigSchema::#m', $new_code)) {
|
||||
echo "Indented ConfigSchema call in $file\n";
|
||||
}
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
./compile-doxygen.sh
|
||||
cd ../docs
|
||||
scp doxygen.tgz htmlpurifier.org:/home/ezyang/htmlpurifier.org
|
||||
ssh htmlpurifier.org "cd /home/ezyang/htmlpurifier.org && ./reload-docs.sh"
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Removes trailing whitespace from files.
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/..');
|
||||
$FS = new FSTools();
|
||||
|
||||
$files = $FS->globr('.', '{,.}*', GLOB_BRACE);
|
||||
foreach ($files as $file) {
|
||||
if (
|
||||
!is_file($file) ||
|
||||
prefix_is('./.git', $file) ||
|
||||
prefix_is('./docs/doxygen', $file) ||
|
||||
postfix_is('.ser', $file) ||
|
||||
postfix_is('.tgz', $file) ||
|
||||
postfix_is('.patch', $file) ||
|
||||
postfix_is('.dtd', $file) ||
|
||||
postfix_is('.ent', $file) ||
|
||||
$file == './library/HTMLPurifier/Lexer/PH5P.php' ||
|
||||
$file == './maintenance/PH5P.php'
|
||||
) continue;
|
||||
$contents = file_get_contents($file);
|
||||
$result = preg_replace('/^(.*?)[ \t]+(\r?)$/m', '\1\2', $contents, -1, $count);
|
||||
if (!$count) continue;
|
||||
echo "$file\n";
|
||||
file_put_contents($file, $result);
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,84 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
require_once '../library/HTMLPurifier.auto.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Renames a configuration directive. This involves renaming the file,
|
||||
* adding an alias, and then regenerating the cache. You still have to
|
||||
* manually go through and fix any calls to the directive.
|
||||
* @warning This script doesn't handle multi-stringhash files.
|
||||
*/
|
||||
|
||||
$argv = $_SERVER['argv'];
|
||||
if (count($argv) < 3) {
|
||||
echo "Usage: {$argv[0]} OldName NewName\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
chdir('../library/HTMLPurifier/ConfigSchema/schema');
|
||||
|
||||
$old = $argv[1];
|
||||
$new = $argv[2];
|
||||
|
||||
if (!file_exists("$old.txt")) {
|
||||
echo "Cannot move undefined configuration directive $old\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($old === $new) {
|
||||
echo "Attempting to move to self, aborting\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (file_exists("$new.txt")) {
|
||||
echo "Cannot move to already defined directive $new\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$file = "$old.txt";
|
||||
$builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder();
|
||||
$interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
||||
$builder->buildFile($interchange, $file);
|
||||
$contents = file_get_contents($file);
|
||||
|
||||
if (strpos($contents, "\r\n") !== false) {
|
||||
$nl = "\r\n";
|
||||
} elseif (strpos($contents, "\r") !== false) {
|
||||
$nl = "\r";
|
||||
} else {
|
||||
$nl = "\n";
|
||||
}
|
||||
|
||||
// replace name with new name
|
||||
$contents = str_replace($old, $new, $contents);
|
||||
|
||||
if ($interchange->directives[$old]->aliases) {
|
||||
$pos_alias = strpos($contents, 'ALIASES:');
|
||||
$pos_ins = strpos($contents, $nl, $pos_alias);
|
||||
if ($pos_ins === false) $pos_ins = strlen($contents);
|
||||
$contents =
|
||||
substr($contents, 0, $pos_ins) . ", $old" . substr($contents, $pos_ins);
|
||||
file_put_contents($file, $contents);
|
||||
} else {
|
||||
$lines = explode($nl, $contents);
|
||||
$insert = false;
|
||||
foreach ($lines as $n => $line) {
|
||||
if (strncmp($line, '--', 2) === 0) {
|
||||
$insert = $n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$insert) {
|
||||
$lines[] = "ALIASES: $old";
|
||||
} else {
|
||||
array_splice($lines, $insert, 0, "ALIASES: $old");
|
||||
}
|
||||
file_put_contents($file, implode($nl, $lines));
|
||||
}
|
||||
|
||||
rename("$old.txt", "$new.txt") || exit(1);
|
61
vendor/ezyang/htmlpurifier/package.php
vendored
61
vendor/ezyang/htmlpurifier/package.php
vendored
|
@ -1,61 +0,0 @@
|
|||
<?php
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
require_once 'PEAR/PackageFileManager2.php';
|
||||
require_once 'PEAR/PackageFileManager/File.php';
|
||||
PEAR::setErrorHandling(PEAR_ERROR_PRINT);
|
||||
$pkg = new PEAR_PackageFileManager2;
|
||||
|
||||
$pkg->setOptions(
|
||||
array(
|
||||
'baseinstalldir' => '/',
|
||||
'packagefile' => 'package.xml',
|
||||
'packagedirectory' => realpath(dirname(__FILE__) . '/library'),
|
||||
'filelistgenerator' => 'file',
|
||||
'include' => array('*'),
|
||||
'dir_roles' => array('/' => 'php'), // hack to put *.ser files in the right place
|
||||
'ignore' => array(
|
||||
'HTMLPurifier.standalone.php',
|
||||
'HTMLPurifier.path.php',
|
||||
'*.tar.gz',
|
||||
'*.tgz',
|
||||
'standalone/'
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$pkg->setPackage('HTMLPurifier');
|
||||
$pkg->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html');
|
||||
$pkg->setSummary('Standards-compliant HTML filter');
|
||||
$pkg->setDescription(
|
||||
'HTML Purifier is an HTML filter that will remove all malicious code
|
||||
(better known as XSS) with a thoroughly audited, secure yet permissive
|
||||
whitelist and will also make sure your documents are standards
|
||||
compliant.'
|
||||
);
|
||||
|
||||
$pkg->addMaintainer('lead', 'ezyang', 'Edward Z. Yang', 'admin@htmlpurifier.org', 'yes');
|
||||
|
||||
$version = trim(file_get_contents('VERSION'));
|
||||
$api_version = substr($version, 0, strrpos($version, '.'));
|
||||
|
||||
$pkg->setChannel('htmlpurifier.org');
|
||||
$pkg->setAPIVersion($api_version);
|
||||
$pkg->setAPIStability('stable');
|
||||
$pkg->setReleaseVersion($version);
|
||||
$pkg->setReleaseStability('stable');
|
||||
|
||||
$pkg->addRelease();
|
||||
|
||||
$pkg->setNotes(file_get_contents('WHATSNEW'));
|
||||
$pkg->setPackageType('php');
|
||||
|
||||
$pkg->setPhpDep('5.0.0');
|
||||
$pkg->setPearinstallerDep('1.4.3');
|
||||
|
||||
$pkg->generateContents();
|
||||
|
||||
$pkg->writePackageFile();
|
||||
|
||||
// vim: et sw=4 sts=4
|
102
vendor/ezyang/htmlpurifier/phpdoc.ini
vendored
102
vendor/ezyang/htmlpurifier/phpdoc.ini
vendored
|
@ -1,102 +0,0 @@
|
|||
;; phpDocumentor parse configuration file
|
||||
;;
|
||||
;; This file is designed to cut down on repetitive typing on the command-line or web interface
|
||||
;; You can copy this file to create a number of configuration files that can be used with the
|
||||
;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web
|
||||
;; interface will automatically generate a list of .ini files that can be used.
|
||||
;;
|
||||
;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs
|
||||
;;
|
||||
;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini
|
||||
;;
|
||||
;; Copyright 2002, Greg Beaver <cellog@users.sourceforge.net>
|
||||
;;
|
||||
;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them
|
||||
|
||||
[Parse Data]
|
||||
;; title of all the documentation
|
||||
;; legal values: any string
|
||||
title = HTML Purifier API Documentation
|
||||
|
||||
;; parse files that start with a . like .bash_profile
|
||||
;; legal values: true, false
|
||||
hidden = false
|
||||
|
||||
;; show elements marked @access private in documentation by setting this to on
|
||||
;; legal values: on, off
|
||||
parseprivate = off
|
||||
|
||||
;; parse with javadoc-like description (first sentence is always the short description)
|
||||
;; legal values: on, off
|
||||
javadocdesc = on
|
||||
|
||||
;; add any custom @tags separated by commas here
|
||||
;; legal values: any legal tagname separated by commas.
|
||||
;customtags = mytag1,mytag2
|
||||
|
||||
;; This is only used by the XML:DocBook/peardoc2 converter
|
||||
defaultcategoryname = Documentation
|
||||
|
||||
;; what is the main package?
|
||||
;; legal values: alphanumeric string plus - and _
|
||||
defaultpackagename = HTMLPurifier
|
||||
|
||||
;; output any parsing information? set to on for cron jobs
|
||||
;; legal values: on
|
||||
;quiet = on
|
||||
|
||||
;; parse a PEAR-style repository. Do not turn this on if your project does
|
||||
;; not have a parent directory named "pear"
|
||||
;; legal values: on/off
|
||||
;pear = on
|
||||
|
||||
;; where should the documentation be written?
|
||||
;; legal values: a legal path
|
||||
target = docs/phpdoc
|
||||
|
||||
;; Which files should be parsed out as special documentation files, such as README,
|
||||
;; INSTALL and CHANGELOG? This overrides the default files found in
|
||||
;; phpDocumentor.ini (this file is not a user .ini file, but the global file)
|
||||
readmeinstallchangelog = README, INSTALL, NEWS, WYSIWYG, SLOW, LICENSE, CREDITS
|
||||
|
||||
;; limit output to the specified packages, even if others are parsed
|
||||
;; legal values: package names separated by commas
|
||||
;packageoutput = package1,package2
|
||||
|
||||
;; comma-separated list of files to parse
|
||||
;; legal values: paths separated by commas
|
||||
;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory
|
||||
|
||||
;; comma-separated list of directories to parse
|
||||
;; legal values: directory paths separated by commas
|
||||
;directory = /path1,/path2,.,..,subdirectory
|
||||
;directory = /home/jeichorn/cvs/pear
|
||||
directory = .
|
||||
|
||||
;; template base directory (the equivalent directory of <installdir>/phpDocumentor)
|
||||
;templatebase = /path/to/my/templates
|
||||
|
||||
;; directory to find any example files in through @example and {@example} tags
|
||||
;examplesdir = /path/to/my/templates
|
||||
|
||||
;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore
|
||||
;; legal values: any wildcard strings separated by commas
|
||||
;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
|
||||
ignore = *tests*,*benchmarks*,*docs*,*test-settings.php,*configdoc*,*maintenance*,*smoketests*,*standalone*,*.svn*,*conf*
|
||||
|
||||
sourcecode = on
|
||||
|
||||
;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format
|
||||
;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,
|
||||
;; HTML:frames:earthli,
|
||||
;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,
|
||||
;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli
|
||||
;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS
|
||||
;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default
|
||||
output=HTML:frames:default
|
||||
|
||||
;; turn this option on if you want highlighted source code for every file
|
||||
;; legal values: on/off
|
||||
sourcecode = on
|
||||
|
||||
; vim: et sw=4 sts=4
|
112
vendor/ezyang/htmlpurifier/plugins/modx.txt
vendored
112
vendor/ezyang/htmlpurifier/plugins/modx.txt
vendored
|
@ -1,112 +0,0 @@
|
|||
|
||||
MODx Plugin
|
||||
|
||||
MODx <http://www.modxcms.com/> is an open source PHP application framework.
|
||||
I first came across them in my referrer logs when tillda asked if anyone
|
||||
could implement an HTML Purifier plugin. This forum thread
|
||||
<http://modxcms.com/forums/index.php/topic,6604.0.html> eventually resulted
|
||||
in the fruition of this plugin that davidm says, "is on top of my favorite
|
||||
list." HTML Purifier goes great with WYSIWYG editors!
|
||||
|
||||
|
||||
|
||||
1. Credits
|
||||
|
||||
PaulGregory wrote the overall structure of the code. I added the
|
||||
slashes hack.
|
||||
|
||||
|
||||
|
||||
2. Install
|
||||
|
||||
First, you need to place HTML Purifier library somewhere. The code here
|
||||
assumes that you've placed in MODx's assets/plugins/htmlpurifier (no version
|
||||
number).
|
||||
|
||||
Log into the manager, and navigate:
|
||||
|
||||
Resources > Manage Resources > Plugins tab > New Plugin
|
||||
|
||||
Type in a name (probably HTML Purifier), and copy paste this code into the
|
||||
textarea:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
$e = &$modx->Event;
|
||||
if ($e->name == 'OnBeforeDocFormSave') {
|
||||
global $content;
|
||||
|
||||
include_once '../assets/plugins/htmlpurifier/library/HTMLPurifier.auto.php';
|
||||
$purifier = new HTMLPurifier();
|
||||
|
||||
static $magic_quotes = null;
|
||||
if ($magic_quotes === null) {
|
||||
// this is an ugly hack because this hook hasn't
|
||||
// had the backslashes removed yet when magic_quotes_gpc is on,
|
||||
// but HTMLPurifier must not have the quotes slashed.
|
||||
$magic_quotes = get_magic_quotes_gpc();
|
||||
}
|
||||
|
||||
if ($magic_quotes) $content = stripslashes($content);
|
||||
$content = $purifier->purify($content);
|
||||
if ($magic_quotes) $content = addslashes($content);
|
||||
}
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Then navigate to the System Events tab and check "OnBeforeDocFormSave".
|
||||
Save the plugin. HTML Purifier now is integrated!
|
||||
|
||||
|
||||
|
||||
3. Making sure it works
|
||||
|
||||
You can test HTML Purifier by deliberately putting in crappy HTML and seeing
|
||||
whether or not it gets fixed. A better way is to put in something like this:
|
||||
|
||||
<p lang="fr">Il est bon</p>
|
||||
|
||||
...and seeing whether or not the content comes out as:
|
||||
|
||||
<p lang="fr" xml:lang="fr">Il est bon</p>
|
||||
|
||||
(lang to xml:lang synchronization is one of the many features HTML Purifier
|
||||
has).
|
||||
|
||||
|
||||
|
||||
4. Caveat Emptor
|
||||
|
||||
This code does not intercept save requests from the QuickEdit plugin, this may
|
||||
be added in a later version. It also modifies things on save, so there's a
|
||||
slight chance that HTML Purifier may make a boo-boo and accidently mess things
|
||||
up (the original version is not saved).
|
||||
|
||||
Finally, make sure that MODx is using UTF-8. If you are using, say, a French
|
||||
localisation, you may be using Latin-1, if that's the case, configure
|
||||
HTML Purifier properly like this:
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Core', 'Encoding', 'ISO-8859-1'); // or whatever encoding
|
||||
$purifier = new HTMLPurifier($config);
|
||||
|
||||
|
||||
|
||||
5. Known Bugs
|
||||
|
||||
'rn' characters sometimes mysteriously appear after purification. We are
|
||||
currently investigating this issue. See: <http://htmlpurifier.org/phorum/read.php?3,1866>
|
||||
|
||||
|
||||
|
||||
6. See Also
|
||||
|
||||
A modified version of Jot 1.1.3 is available, which integrates with HTML
|
||||
Purifier. You can check it out here: <http://modxcms.com/forums/index.php/topic,25621.msg161970.html>
|
||||
|
||||
|
||||
X. Changelog
|
||||
|
||||
2008-06-16
|
||||
- Updated code to work with 3.1.0 and later
|
||||
- Add Known Bugs and See Also section
|
||||
|
||||
vim: et sw=4 sts=4
|
|
@ -1,2 +0,0 @@
|
|||
migrate.php
|
||||
htmlpurifier/*
|
|
@ -1,27 +0,0 @@
|
|||
Changelog HTMLPurifier : Phorum Mod
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
= KEY ====================
|
||||
# Breaks back-compat
|
||||
! Feature
|
||||
- Bugfix
|
||||
+ Sub-comment
|
||||
. Internal change
|
||||
==========================
|
||||
|
||||
Version 4.0.0 for Phorum 5.2, released July 9, 2009
|
||||
# Works only with HTML Purifier 4.0.0
|
||||
! Better installation documentation
|
||||
- Fixed double encoded quotes
|
||||
- Fixed fatal error when migrate.php is blank
|
||||
|
||||
Version 3.0.0 for Phorum 5.2, released January 12, 2008
|
||||
# WYSIWYG and suppress_message options are now configurable via web
|
||||
interface.
|
||||
- Module now compatible with Phorum 5.2, primary bugs were in migration
|
||||
code as well as signature and edit message handling. This module is NOT
|
||||
compatible with Phorum 5.1.
|
||||
- Buggy WYSIWYG mode refined
|
||||
. AutoFormatParam added to list of default configuration namespaces
|
||||
|
||||
vim: et sw=4 sts=4
|
|
@ -1,84 +0,0 @@
|
|||
|
||||
Install
|
||||
How to install the Phorum HTML Purifier plugin
|
||||
|
||||
0. PREREQUISITES
|
||||
----------------
|
||||
This Phorum module only works on PHP5 and with HTML Purifier 4.0.0
|
||||
or later.
|
||||
|
||||
1. UNZIP
|
||||
--------
|
||||
Unzip phorum-htmlpurifier-x.y.z, producing an htmlpurifier folder.
|
||||
You've already done this step if you're reading this!
|
||||
|
||||
2. MOVE
|
||||
-------
|
||||
Move the htmlpurifier folder to the mods/ folder of your Phorum
|
||||
installation, so the directory structure looks like:
|
||||
|
||||
phorum/
|
||||
mods/
|
||||
htmlpurifier/
|
||||
INSTALL - this install file
|
||||
info.txt, ... - the module files
|
||||
htmlpurifier/
|
||||
|
||||
3. INSTALL HTML PURIFIER
|
||||
------------------------
|
||||
Download and unzip HTML Purifier <htmlpurifier.org>. Place the contents of
|
||||
the library/ folder in the htmlpurifier/htmlpurifier folder. Your directory
|
||||
structure will look like:
|
||||
|
||||
phorum/
|
||||
mods/
|
||||
htmlpurifier/
|
||||
htmlpurifier/
|
||||
HTMLPurifier.auto.php
|
||||
... - other files
|
||||
HTMLPurifier/
|
||||
|
||||
Advanced users:
|
||||
If you have HTML Purifier installed elsewhere on your server,
|
||||
all you need is an HTMLPurifier.auto.php file in the library folder which
|
||||
includes the HTMLPurifier.auto.php file in your install.
|
||||
|
||||
4. MIGRATE
|
||||
----------
|
||||
If you're setting up a new Phorum installation, all you need to do is create
|
||||
a blank migrate.php file in the htmlpurifier module folder (NOT the library
|
||||
folder.
|
||||
|
||||
If you have an old Phorum installation and was using BBCode,
|
||||
copy migrate.bbcode.php to migrate.php. If you were using a different input
|
||||
format, follow the instructions in migrate.bbcode.php to create your own custom
|
||||
migrate.php file.
|
||||
|
||||
Your directory structure should now look like this:
|
||||
|
||||
phorum/
|
||||
mods/
|
||||
htmlpurifier/
|
||||
migrate.php
|
||||
|
||||
5. ENABLE
|
||||
---------
|
||||
Navigate to your Phorum admin panel at http://example.com/phorum/admin.php,
|
||||
click on Global Settings > Modules, scroll to "HTML Purifier Phorum Mod" and
|
||||
turn it On.
|
||||
|
||||
6. MIGRATE SIGNATURES
|
||||
---------------------
|
||||
If you're setting up a new Phorum installation, skip this step.
|
||||
|
||||
If you allowed your users to make signatures, navigate to the module settings
|
||||
page of HTML Purifier (Global Settings > Modules > HTML Purifier Phorum Mod >
|
||||
Configure), type in "yes" in the "Confirm" box, and press "Migrate."
|
||||
|
||||
ONLY DO THIS ONCE! BE SURE TO BACK UP YOUR DATABASE!
|
||||
|
||||
7. CONFIGURE
|
||||
------------
|
||||
Configure using Edit settings. See that page for more information.
|
||||
|
||||
vim: et sw=4 sts=4
|
45
vendor/ezyang/htmlpurifier/plugins/phorum/README
vendored
45
vendor/ezyang/htmlpurifier/plugins/phorum/README
vendored
|
@ -1,45 +0,0 @@
|
|||
|
||||
HTML Purifier Phorum Mod - Filter your HTML the Standards-Compliant Way!
|
||||
|
||||
This Phorum mod enables HTML posting on Phorum. Under normal circumstances,
|
||||
this would cause a huge security risk, but because we are running
|
||||
HTML through HTML Purifier, output is guaranteed to be XSS free and
|
||||
standards-compliant.
|
||||
|
||||
This mod requires HTML input, and previous markup languages need to be
|
||||
converted accordingly. Thus, it is vital that you create a 'migrate.php'
|
||||
file that works with your installation. If you're using the built-in
|
||||
BBCode formatting, simply move migrate.bbcode.php to that place; for
|
||||
other markup languages, consult said file for instructions on how
|
||||
to adapt it to your needs.
|
||||
|
||||
-- NOTE -------------------------------------------------
|
||||
You can also run this module in parallel with another
|
||||
formatting module; this module attempts to place itself
|
||||
at the end of the filtering chain. However, if any
|
||||
previous modules produce insecure HTML (for instance,
|
||||
a JavaScript email obfuscator) they will get cleaned.
|
||||
|
||||
This module will not work if 'migrate.php' is not created, and an improperly
|
||||
made migration file may *CORRUPT* Phorum, so please take your time to
|
||||
do this correctly. It should go without saying to *BACKUP YOUR DATABASE*
|
||||
before attempting anything here. If no migration is necessary, you can
|
||||
simply create a blank migrate.php file. HTML Purifier is smart and will
|
||||
not re-migrate already processed messages. However, the original code
|
||||
is irretrievably lost (we may change this in the future.)
|
||||
|
||||
This module will not automatically migrate user signatures, because this
|
||||
process may take a long time. After installing the HTML Purifier module and
|
||||
then configuring 'migrate.php', navigate to Settings and click 'Migrate
|
||||
Signatures' to migrate all user signatures to HTML.
|
||||
|
||||
All of HTML Purifier's usual functions are configurable via the mod settings
|
||||
page. If you require custom configuration, create config.php file in
|
||||
the mod directory that edits a $config variable. Be sure, also, to
|
||||
set $PHORUM['mod_htmlpurifier']['wysiwyg'] to TRUE if you are using a
|
||||
WYSIWYG editor (you can do this through a common hook or the web
|
||||
configuration form).
|
||||
|
||||
Visit HTML Purifier at <http://htmlpurifier.org/>.
|
||||
|
||||
vim: et sw=4 sts=4
|
|
@ -1,58 +0,0 @@
|
|||
<?php
|
||||
|
||||
if(!defined("PHORUM")) exit;
|
||||
|
||||
// default HTML Purifier configuration settings
|
||||
$config->set('HTML.Allowed',
|
||||
// alphabetically sorted
|
||||
'a[href|title]
|
||||
abbr[title]
|
||||
acronym[title]
|
||||
b
|
||||
blockquote[cite]
|
||||
br
|
||||
caption
|
||||
cite
|
||||
code
|
||||
dd
|
||||
del
|
||||
dfn
|
||||
div
|
||||
dl
|
||||
dt
|
||||
em
|
||||
i
|
||||
img[src|alt|title|class]
|
||||
ins
|
||||
kbd
|
||||
li
|
||||
ol
|
||||
p
|
||||
pre
|
||||
s
|
||||
strike
|
||||
strong
|
||||
sub
|
||||
sup
|
||||
table
|
||||
tbody
|
||||
td
|
||||
tfoot
|
||||
th
|
||||
thead
|
||||
tr
|
||||
tt
|
||||
u
|
||||
ul
|
||||
var');
|
||||
$config->set('AutoFormat.AutoParagraph', true);
|
||||
$config->set('AutoFormat.Linkify', true);
|
||||
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
|
||||
$config->set('Core.AggressivelyFixLt', true);
|
||||
$config->set('Core.Encoding', $GLOBALS['PHORUM']['DATA']['CHARSET']); // we'll change this eventually
|
||||
if (strtolower($GLOBALS['PHORUM']['DATA']['CHARSET']) !== 'utf-8') {
|
||||
$config->set('Core.EscapeNonASCIICharacters', true);
|
||||
}
|
||||
$config->set('Core.AllowParseManyTags', false);
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,316 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* HTML Purifier Phorum Mod. Filter your HTML the Standards-Compliant Way!
|
||||
*
|
||||
* This Phorum mod enables users to post raw HTML into Phorum. But never
|
||||
* fear: with the help of HTML Purifier, this HTML will be beat into
|
||||
* de-XSSed and standards-compliant form, safe for general consumption.
|
||||
* It is not recommended, but possible to run this mod in parallel
|
||||
* with other formatters (in short, please DISABLE the BBcode mod).
|
||||
*
|
||||
* For help migrating from your previous markup language to pure HTML
|
||||
* please check the migrate.bbcode.php file.
|
||||
*
|
||||
* If you'd like to use this with a WYSIWYG editor, make sure that
|
||||
* editor sets $PHORUM['mod_htmlpurifier']['wysiwyg'] to true. Otherwise,
|
||||
* administrators who need to edit other people's comments may be at
|
||||
* risk for some nasty attacks.
|
||||
*
|
||||
* Tested with Phorum 5.2.11.
|
||||
*/
|
||||
|
||||
// Note: Cache data is base64 encoded because Phorum insists on flinging
|
||||
// to the user and expecting it to come back unharmed, newlines and
|
||||
// all, which ain't happening. It's slower, it takes up more space, but
|
||||
// at least it won't get mutilated
|
||||
|
||||
/**
|
||||
* Purifies a data array
|
||||
*/
|
||||
function phorum_htmlpurifier_format($data)
|
||||
{
|
||||
$PHORUM = $GLOBALS["PHORUM"];
|
||||
|
||||
$purifier =& HTMLPurifier::getInstance();
|
||||
$cache_serial = $PHORUM['mod_htmlpurifier']['body_cache_serial'];
|
||||
|
||||
foreach($data as $message_id => $message){
|
||||
if(isset($message['body'])) {
|
||||
|
||||
if ($message_id) {
|
||||
// we're dealing with a real message, not a fake, so
|
||||
// there a number of shortcuts that can be taken
|
||||
|
||||
if (isset($message['meta']['htmlpurifier_light'])) {
|
||||
// format hook was called outside of Phorum's normal
|
||||
// functions, do the abridged purification
|
||||
$data[$message_id]['body'] = $purifier->purify($message['body']);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($PHORUM['args']['purge'])) {
|
||||
// purge the cache, must be below the following if
|
||||
unset($message['meta']['body_cache']);
|
||||
}
|
||||
|
||||
if (
|
||||
isset($message['meta']['body_cache']) &&
|
||||
isset($message['meta']['body_cache_serial']) &&
|
||||
$message['meta']['body_cache_serial'] == $cache_serial
|
||||
) {
|
||||
// cached version is present, bail out early
|
||||
$data[$message_id]['body'] = base64_decode($message['meta']['body_cache']);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// migration might edit this array, that's why it's defined
|
||||
// so early
|
||||
$updated_message = array();
|
||||
|
||||
// create the $body variable
|
||||
if (
|
||||
$message_id && // message must be real to migrate
|
||||
!isset($message['meta']['body_cache_serial'])
|
||||
) {
|
||||
// perform migration
|
||||
$fake_data = array();
|
||||
list($signature, $edit_message) = phorum_htmlpurifier_remove_sig_and_editmessage($message);
|
||||
$fake_data[$message_id] = $message;
|
||||
$fake_data = phorum_htmlpurifier_migrate($fake_data);
|
||||
$body = $fake_data[$message_id]['body'];
|
||||
$body = str_replace("<phorum break>\n", "\n", $body);
|
||||
$updated_message['body'] = $body; // save it in
|
||||
$body .= $signature . $edit_message; // add it back in
|
||||
} else {
|
||||
// reverse Phorum's pre-processing
|
||||
$body = $message['body'];
|
||||
// order is important
|
||||
$body = str_replace("<phorum break>\n", "\n", $body);
|
||||
$body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body);
|
||||
if (!$message_id && defined('PHORUM_CONTROL_CENTER')) {
|
||||
// we're in control.php, so it was double-escaped
|
||||
$body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body);
|
||||
}
|
||||
}
|
||||
|
||||
$body = $purifier->purify($body);
|
||||
|
||||
// dynamically update the cache (MUST BE DONE HERE!)
|
||||
// this is inefficient because it's one db call per
|
||||
// cache miss, but once the cache is in place things are
|
||||
// a lot zippier.
|
||||
|
||||
if ($message_id) { // make sure it's not a fake id
|
||||
$updated_message['meta'] = $message['meta'];
|
||||
$updated_message['meta']['body_cache'] = base64_encode($body);
|
||||
$updated_message['meta']['body_cache_serial'] = $cache_serial;
|
||||
phorum_db_update_message($message_id, $updated_message);
|
||||
}
|
||||
|
||||
// must not get overloaded until after we cache it, otherwise
|
||||
// we'll inadvertently change the original text
|
||||
$data[$message_id]['body'] = $body;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// This is fragile code, copied from read.php:596 (Phorum 5.2.6). Please
|
||||
// keep this code in-sync with Phorum
|
||||
|
||||
/**
|
||||
* Generates a signature based on a message array
|
||||
*/
|
||||
function phorum_htmlpurifier_generate_sig($row)
|
||||
{
|
||||
$phorum_sig = '';
|
||||
if(isset($row["user"]["signature"])
|
||||
&& isset($row['meta']['show_signature']) && $row['meta']['show_signature']==1){
|
||||
$phorum_sig=trim($row["user"]["signature"]);
|
||||
if(!empty($phorum_sig)){
|
||||
$phorum_sig="\n\n$phorum_sig";
|
||||
}
|
||||
}
|
||||
return $phorum_sig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an edit message based on a message array
|
||||
*/
|
||||
function phorum_htmlpurifier_generate_editmessage($row)
|
||||
{
|
||||
$PHORUM = $GLOBALS['PHORUM'];
|
||||
$editmessage = '';
|
||||
if(isset($row['meta']['edit_count']) && $row['meta']['edit_count'] > 0) {
|
||||
$editmessage = str_replace ("%count%", $row['meta']['edit_count'], $PHORUM["DATA"]["LANG"]["EditedMessage"]);
|
||||
$editmessage = str_replace ("%lastedit%", phorum_date($PHORUM["short_date_time"],$row['meta']['edit_date']), $editmessage);
|
||||
$editmessage = str_replace ("%lastuser%", $row['meta']['edit_username'], $editmessage);
|
||||
$editmessage = "\n\n\n\n$editmessage";
|
||||
}
|
||||
return $editmessage;
|
||||
}
|
||||
|
||||
// End fragile code
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Removes the signature and edit message from a message
|
||||
* @param $row Message passed by reference
|
||||
*/
|
||||
function phorum_htmlpurifier_remove_sig_and_editmessage(&$row)
|
||||
{
|
||||
$signature = phorum_htmlpurifier_generate_sig($row);
|
||||
$editmessage = phorum_htmlpurifier_generate_editmessage($row);
|
||||
$replacements = array();
|
||||
// we need to remove add <phorum break> as that is the form these
|
||||
// extra bits are in.
|
||||
if ($signature) $replacements[str_replace("\n", "<phorum break>\n", $signature)] = '';
|
||||
if ($editmessage) $replacements[str_replace("\n", "<phorum break>\n", $editmessage)] = '';
|
||||
$row['body'] = strtr($row['body'], $replacements);
|
||||
return array($signature, $editmessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that data is fully HTML and not from migration, invalidate
|
||||
* previous caches
|
||||
* @note This function could generate the actual cache entries, but
|
||||
* since there's data missing that must be deferred to the first read
|
||||
*/
|
||||
function phorum_htmlpurifier_posting($message)
|
||||
{
|
||||
$PHORUM = $GLOBALS["PHORUM"];
|
||||
unset($message['meta']['body_cache']); // invalidate the cache
|
||||
$message['meta']['body_cache_serial'] = $PHORUM['mod_htmlpurifier']['body_cache_serial'];
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overload quoting mechanism to prevent default, mail-style quote from happening
|
||||
*/
|
||||
function phorum_htmlpurifier_quote($array)
|
||||
{
|
||||
$PHORUM = $GLOBALS["PHORUM"];
|
||||
$purifier =& HTMLPurifier::getInstance();
|
||||
$text = $purifier->purify($array[1]);
|
||||
$source = htmlspecialchars($array[0]);
|
||||
return "<blockquote cite=\"$source\">\n$text\n</blockquote>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that our format hook is processed last. Also, loads the library.
|
||||
* @credits <http://secretsauce.phorum.org/snippets/make_bbcode_last_formatter.php.txt>
|
||||
*/
|
||||
function phorum_htmlpurifier_common()
|
||||
{
|
||||
require_once(dirname(__FILE__).'/htmlpurifier/HTMLPurifier.auto.php');
|
||||
require(dirname(__FILE__).'/init-config.php');
|
||||
|
||||
$config = phorum_htmlpurifier_get_config();
|
||||
HTMLPurifier::getInstance($config);
|
||||
|
||||
// increment revision.txt if you want to invalidate the cache
|
||||
$GLOBALS['PHORUM']['mod_htmlpurifier']['body_cache_serial'] = $config->getSerial();
|
||||
|
||||
// load migration
|
||||
if (file_exists(dirname(__FILE__) . '/migrate.php')) {
|
||||
include(dirname(__FILE__) . '/migrate.php');
|
||||
} else {
|
||||
echo '<strong>Error:</strong> No migration path specified for HTML Purifier, please check
|
||||
<tt>modes/htmlpurifier/migrate.bbcode.php</tt> for instructions on
|
||||
how to migrate from your previous markup language.';
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!function_exists('phorum_htmlpurifier_migrate')) {
|
||||
// Dummy function
|
||||
function phorum_htmlpurifier_migrate($data) {return $data;}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-emptively performs purification if it looks like a WYSIWYG editor
|
||||
* is being used
|
||||
*/
|
||||
function phorum_htmlpurifier_before_editor($message)
|
||||
{
|
||||
if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) {
|
||||
if (!empty($message['body'])) {
|
||||
$body = $message['body'];
|
||||
// de-entity-ize contents
|
||||
$body = str_replace(array('<','>','&'), array('<','>','&'), $body);
|
||||
$purifier =& HTMLPurifier::getInstance();
|
||||
$body = $purifier->purify($body);
|
||||
// re-entity-ize contents
|
||||
$body = htmlspecialchars($body, ENT_QUOTES, $GLOBALS['PHORUM']['DATA']['CHARSET']);
|
||||
$message['body'] = $body;
|
||||
}
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_editor_after_subject()
|
||||
{
|
||||
// don't show this message if it's a WYSIWYG editor, since it will
|
||||
// then be handled automatically
|
||||
if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) {
|
||||
$i = $GLOBALS['PHORUM']['DATA']['MODE'];
|
||||
if ($i == 'quote' || $i == 'edit' || $i == 'moderation') {
|
||||
?>
|
||||
<div>
|
||||
<p>
|
||||
<strong>Notice:</strong> HTML has been scrubbed for your safety.
|
||||
If you would like to see the original, turn off WYSIWYG mode
|
||||
(consult your administrator for details.)
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message'])) return;
|
||||
?><div class="htmlpurifier-help">
|
||||
<p>
|
||||
<strong>HTML input</strong> is enabled. Make sure you escape all HTML and
|
||||
angled brackets with <code>&lt;</code> and <code>&gt;</code>.
|
||||
</p><?php
|
||||
$purifier =& HTMLPurifier::getInstance();
|
||||
$config = $purifier->config;
|
||||
if ($config->get('AutoFormat.AutoParagraph')) {
|
||||
?><p>
|
||||
<strong>Auto-paragraphing</strong> is enabled. Double
|
||||
newlines will be converted to paragraphs; for single
|
||||
newlines, use the <code>pre</code> tag.
|
||||
</p><?php
|
||||
}
|
||||
$html_definition = $config->getDefinition('HTML');
|
||||
$allowed = array();
|
||||
foreach ($html_definition->info as $name => $x) $allowed[] = "<code>$name</code>";
|
||||
sort($allowed);
|
||||
$allowed_text = implode(', ', $allowed);
|
||||
?><p><strong>Allowed tags:</strong> <?php
|
||||
echo $allowed_text;
|
||||
?>.</p><?php
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
For inputting literal code such as HTML and PHP for display, use
|
||||
CDATA tags to auto-escape your angled brackets, and <code>pre</code>
|
||||
to preserve newlines:
|
||||
</p>
|
||||
<pre><pre><![CDATA[
|
||||
<em>Place code here</em>
|
||||
]]></pre></pre>
|
||||
<p>
|
||||
Power users, you can hide this notice with:
|
||||
<pre>.htmlpurifier-help {display:none;}</pre>
|
||||
</p>
|
||||
</div><?php
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,18 +0,0 @@
|
|||
title: HTML Purifier Phorum Mod
|
||||
desc: This module enables standards-compliant HTML filtering on Phorum. Please check migrate.bbcode.php before enabling this mod.
|
||||
author: Edward Z. Yang
|
||||
url: http://htmlpurifier.org/
|
||||
version: 4.0.0
|
||||
|
||||
hook: format|phorum_htmlpurifier_format
|
||||
hook: quote|phorum_htmlpurifier_quote
|
||||
hook: posting_custom_action|phorum_htmlpurifier_posting
|
||||
hook: common|phorum_htmlpurifier_common
|
||||
hook: before_editor|phorum_htmlpurifier_before_editor
|
||||
hook: tpl_editor_after_subject|phorum_htmlpurifier_editor_after_subject
|
||||
|
||||
# This module is meant to be a drop-in for bbcode, so make it run last.
|
||||
priority: run module after *
|
||||
priority: run hook format after *
|
||||
|
||||
vim: et sw=4 sts=4
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Initializes the appropriate configuration from either a PHP file
|
||||
* or a module configuration value
|
||||
* @return Instance of HTMLPurifier_Config
|
||||
*/
|
||||
function phorum_htmlpurifier_get_config($default = false)
|
||||
{
|
||||
global $PHORUM;
|
||||
$config_exists = phorum_htmlpurifier_config_file_exists();
|
||||
if ($default || $config_exists || !isset($PHORUM['mod_htmlpurifier']['config'])) {
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
include(dirname(__FILE__) . '/config.default.php');
|
||||
if ($config_exists) {
|
||||
include(dirname(__FILE__) . '/config.php');
|
||||
}
|
||||
unset($PHORUM['mod_htmlpurifier']['config']); // unnecessary
|
||||
} else {
|
||||
$config = HTMLPurifier_Config::create($PHORUM['mod_htmlpurifier']['config']);
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_config_file_exists()
|
||||
{
|
||||
return file_exists(dirname(__FILE__) . '/config.php');
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is responsible for migrating from a specific markup language
|
||||
* like BBCode or Markdown to HTML. WARNING: THIS PROCESS IS NOT REVERSIBLE
|
||||
*
|
||||
* Copy this file to 'migrate.php' and it will automatically work for
|
||||
* BBCode; you may need to tweak this a little to get it to work for other
|
||||
* languages (usually, just replace the include name and the function name).
|
||||
*
|
||||
* If you do NOT want to have any migration performed (for instance, you
|
||||
* are installing the module on a new forum with no posts), simply remove
|
||||
* phorum_htmlpurifier_migrate() function. You still need migrate.php
|
||||
* present, otherwise the module won't work. This ensures that the user
|
||||
* explicitly says, "No, I do not need to migrate."
|
||||
*/
|
||||
|
||||
if(!defined("PHORUM")) exit;
|
||||
|
||||
require_once(dirname(__FILE__) . "/../bbcode/bbcode.php");
|
||||
|
||||
/**
|
||||
* 'format' hook style function that will be called to convert
|
||||
* legacy markup into HTML.
|
||||
*/
|
||||
function phorum_htmlpurifier_migrate($data)
|
||||
{
|
||||
return phorum_mod_bbcode_format($data); // bbcode's 'format' hook
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
|
||||
// based off of BBCode's settings file
|
||||
|
||||
/**
|
||||
* HTML Purifier Phorum mod settings configuration. This provides
|
||||
* a convenient web-interface for editing the most common HTML Purifier
|
||||
* configuration directives. You can also specify custom configuration
|
||||
* by creating a 'config.php' file.
|
||||
*/
|
||||
|
||||
if(!defined("PHORUM_ADMIN")) exit;
|
||||
|
||||
// error reporting is good!
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
// load library and other paraphenalia
|
||||
require_once './include/admin/PhorumInputForm.php';
|
||||
require_once (dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.auto.php');
|
||||
require_once (dirname(__FILE__) . '/init-config.php');
|
||||
require_once (dirname(__FILE__) . '/settings/migrate-sigs-form.php');
|
||||
require_once (dirname(__FILE__) . '/settings/migrate-sigs.php');
|
||||
require_once (dirname(__FILE__) . '/settings/form.php');
|
||||
require_once (dirname(__FILE__) . '/settings/save.php');
|
||||
|
||||
// define friendly configuration directives. you can expand this array
|
||||
// to get more web-definable directives
|
||||
$PHORUM['mod_htmlpurifier']['directives'] = array(
|
||||
'URI.Host', // auto-detectable
|
||||
'URI.DisableExternal',
|
||||
'URI.DisableExternalResources',
|
||||
'URI.DisableResources',
|
||||
'URI.Munge',
|
||||
'URI.HostBlacklist',
|
||||
'URI.Disable',
|
||||
'HTML.TidyLevel',
|
||||
'HTML.Doctype', // auto-detectable
|
||||
'HTML.Allowed',
|
||||
'AutoFormat',
|
||||
'-AutoFormat.Custom',
|
||||
'AutoFormatParam',
|
||||
'Output.TidyFormat',
|
||||
);
|
||||
|
||||
// lower this setting if you're getting time outs/out of memory
|
||||
$PHORUM['mod_htmlpurifier']['migrate-sigs-increment'] = 100;
|
||||
|
||||
if (isset($_POST['reset'])) {
|
||||
unset($PHORUM['mod_htmlpurifier']['config']);
|
||||
}
|
||||
|
||||
if ($offset = phorum_htmlpurifier_migrate_sigs_check()) {
|
||||
// migrate signatures
|
||||
phorum_htmlpurifier_migrate_sigs($offset);
|
||||
} elseif(!empty($_POST)){
|
||||
// save settings
|
||||
phorum_htmlpurifier_save_settings();
|
||||
}
|
||||
|
||||
phorum_htmlpurifier_show_migrate_sigs_form();
|
||||
echo '<br />';
|
||||
phorum_htmlpurifier_show_form();
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
|
||||
function phorum_htmlpurifier_show_form()
|
||||
{
|
||||
if (phorum_htmlpurifier_config_file_exists()) {
|
||||
phorum_htmlpurifier_show_config_info();
|
||||
return;
|
||||
}
|
||||
|
||||
global $PHORUM;
|
||||
|
||||
$config = phorum_htmlpurifier_get_config();
|
||||
|
||||
$frm = new PhorumInputForm ("", "post", "Save");
|
||||
$frm->hidden("module", "modsettings");
|
||||
$frm->hidden("mod", "htmlpurifier"); // this is the directory name that the Settings file lives in
|
||||
|
||||
if (!empty($error)){
|
||||
echo "$error<br />";
|
||||
}
|
||||
|
||||
$frm->addbreak("Edit settings for the HTML Purifier module");
|
||||
|
||||
$frm->addMessage('<p>The box below sets <code>$PHORUM[\'mod_htmlpurifier\'][\'wysiwyg\']</code>.
|
||||
When checked, contents sent for edit are now purified and the
|
||||
informative message is disabled. If your WYSIWYG editor is disabled for
|
||||
admin edits, you can safely keep this unchecked.</p>');
|
||||
$frm->addRow('Use WYSIWYG?', $frm->checkbox('wysiwyg', '1', '', $PHORUM['mod_htmlpurifier']['wysiwyg']));
|
||||
|
||||
$frm->addMessage('<p>The box below sets <code>$PHORUM[\'mod_htmlpurifier\'][\'suppress_message\']</code>,
|
||||
which removes the big how-to use
|
||||
HTML Purifier message.</p>');
|
||||
$frm->addRow('Suppress information?', $frm->checkbox('suppress_message', '1', '', $PHORUM['mod_htmlpurifier']['suppress_message']));
|
||||
|
||||
$frm->addMessage('<p>Click on directive links to read what each option does
|
||||
(links do not open in new windows).</p>
|
||||
<p>For more flexibility (for instance, you want to edit the full
|
||||
range of configuration directives), you can create a <tt>config.php</tt>
|
||||
file in your <tt>mods/htmlpurifier/</tt> directory. Doing so will,
|
||||
however, make the web configuration interface unavailable.</p>');
|
||||
|
||||
require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
||||
$htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s');
|
||||
$htmlpurifier_form->setTextareaDimensions(23, 7); // widen a little, since we have space
|
||||
|
||||
$frm->addMessage($htmlpurifier_form->render(
|
||||
$config, $PHORUM['mod_htmlpurifier']['directives'], false));
|
||||
|
||||
$frm->addMessage("<strong>Warning: Changing HTML Purifier's configuration will invalidate
|
||||
the cache. Expect to see a flurry of database activity after you change
|
||||
any of these settings.</strong>");
|
||||
|
||||
$frm->addrow('Reset to defaults:', $frm->checkbox("reset", "1", "", false));
|
||||
|
||||
// hack to include extra styling
|
||||
echo '<style type="text/css">' . $htmlpurifier_form->getCSS() . '
|
||||
.hp-config {margin-left:auto;margin-right:auto;}
|
||||
</style>';
|
||||
$js = $htmlpurifier_form->getJavaScript();
|
||||
echo '<script type="text/javascript">'."<!--\n$js\n//-->".'</script>';
|
||||
|
||||
$frm->show();
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_show_config_info()
|
||||
{
|
||||
global $PHORUM;
|
||||
|
||||
// update mod_htmlpurifier for housekeeping
|
||||
phorum_htmlpurifier_commit_settings();
|
||||
|
||||
// politely tell user how to edit settings manually
|
||||
?>
|
||||
<div class="input-form-td-break">How to edit settings for HTML Purifier module</div>
|
||||
<p>
|
||||
A <tt>config.php</tt> file exists in your <tt>mods/htmlpurifier/</tt>
|
||||
directory. This file contains your custom configuration: in order to
|
||||
change it, please navigate to that file and edit it accordingly.
|
||||
You can also set <code>$GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg']</code>
|
||||
or <code>$GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message']</code>
|
||||
</p>
|
||||
<p>
|
||||
To use the web interface, delete <tt>config.php</tt> (or rename it to
|
||||
<tt>config.php.bak</tt>).
|
||||
</p>
|
||||
<p>
|
||||
<strong>Warning: Changing HTML Purifier's configuration will invalidate
|
||||
the cache. Expect to see a flurry of database activity after you change
|
||||
any of these settings.</strong>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
function phorum_htmlpurifier_show_migrate_sigs_form()
|
||||
{
|
||||
$frm = new PhorumInputForm ('', "post", "Migrate");
|
||||
$frm->hidden("module", "modsettings");
|
||||
$frm->hidden("mod", "htmlpurifier");
|
||||
$frm->hidden("migrate-sigs", "1");
|
||||
$frm->addbreak("Migrate user signatures to HTML");
|
||||
$frm->addMessage('This operation will migrate your users signatures
|
||||
to HTML. <strong>This process is irreversible and must only be performed once.</strong>
|
||||
Type in yes in the confirmation field to migrate.');
|
||||
if (!file_exists(dirname(__FILE__) . '/../migrate.php')) {
|
||||
$frm->addMessage('Migration file does not exist, cannot migrate signatures.
|
||||
Please check <tt>migrate.bbcode.php</tt> on how to create an appropriate file.');
|
||||
} else {
|
||||
$frm->addrow('Confirm:', $frm->text_box("confirmation", ""));
|
||||
}
|
||||
$frm->show();
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,79 +0,0 @@
|
|||
<?php
|
||||
|
||||
function phorum_htmlpurifier_migrate_sigs_check()
|
||||
{
|
||||
global $PHORUM;
|
||||
$offset = 0;
|
||||
if (!empty($_POST['migrate-sigs'])) {
|
||||
if (!isset($_POST['confirmation']) || strtolower($_POST['confirmation']) !== 'yes') {
|
||||
echo 'Invalid confirmation code.';
|
||||
exit;
|
||||
}
|
||||
$PHORUM['mod_htmlpurifier']['migrate-sigs'] = true;
|
||||
phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"]));
|
||||
$offset = 1;
|
||||
} elseif (!empty($_GET['migrate-sigs']) && $PHORUM['mod_htmlpurifier']['migrate-sigs']) {
|
||||
$offset = (int) $_GET['migrate-sigs'];
|
||||
}
|
||||
return $offset;
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_migrate_sigs($offset)
|
||||
{
|
||||
global $PHORUM;
|
||||
|
||||
if(!$offset) return; // bail out quick if $offset == 0
|
||||
|
||||
// theoretically, we could get rid of this multi-request
|
||||
// doo-hickery if safe mode is off
|
||||
@set_time_limit(0); // attempt to let this run
|
||||
$increment = $PHORUM['mod_htmlpurifier']['migrate-sigs-increment'];
|
||||
|
||||
require_once(dirname(__FILE__) . '/../migrate.php');
|
||||
// migrate signatures
|
||||
// do this in batches so we don't run out of time/space
|
||||
$end = $offset + $increment;
|
||||
$user_ids = array();
|
||||
for ($i = $offset; $i < $end; $i++) {
|
||||
$user_ids[] = $i;
|
||||
}
|
||||
$userinfos = phorum_db_user_get_fields($user_ids, 'signature');
|
||||
foreach ($userinfos as $i => $user) {
|
||||
if (empty($user['signature'])) continue;
|
||||
$sig = $user['signature'];
|
||||
// perform standard Phorum processing on the sig
|
||||
$sig = str_replace(array("&","<",">"), array("&","<",">"), $sig);
|
||||
$sig = preg_replace("/<((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+?)>/i", "$1", $sig);
|
||||
// prepare fake data to pass to migration function
|
||||
$fake_data = array(array("author"=>"", "email"=>"", "subject"=>"", 'body' => $sig));
|
||||
list($fake_message) = phorum_htmlpurifier_migrate($fake_data);
|
||||
$user['signature'] = $fake_message['body'];
|
||||
if (!phorum_api_user_save($user)) {
|
||||
exit('Error while saving user data');
|
||||
}
|
||||
}
|
||||
unset($userinfos); // free up memory
|
||||
|
||||
// query for highest ID in database
|
||||
$type = $PHORUM['DBCONFIG']['type'];
|
||||
$sql = "select MAX(user_id) from {$PHORUM['user_table']}";
|
||||
$row = phorum_db_interact(DB_RETURN_ROW, $sql);
|
||||
$top_id = (int) $row[0];
|
||||
|
||||
$offset += $increment;
|
||||
if ($offset > $top_id) { // test for end condition
|
||||
echo 'Migration finished';
|
||||
$PHORUM['mod_htmlpurifier']['migrate-sigs'] = false;
|
||||
phorum_htmlpurifier_commit_settings();
|
||||
return true;
|
||||
}
|
||||
$host = $_SERVER['HTTP_HOST'];
|
||||
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
|
||||
$extra = 'admin.php?module=modsettings&mod=htmlpurifier&migrate-sigs=' . $offset;
|
||||
// relies on output buffering to work
|
||||
header("Location: http://$host$uri/$extra");
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
|
||||
function phorum_htmlpurifier_save_settings()
|
||||
{
|
||||
global $PHORUM;
|
||||
if (phorum_htmlpurifier_config_file_exists()) {
|
||||
echo "Cannot update settings, <code>mods/htmlpurifier/config.php</code> already exists. To change
|
||||
settings, edit that file. To use the web form, delete that file.<br />";
|
||||
} else {
|
||||
$config = phorum_htmlpurifier_get_config(true);
|
||||
if (!isset($_POST['reset'])) $config->mergeArrayFromForm($_POST, 'config', $PHORUM['mod_htmlpurifier']['directives']);
|
||||
$PHORUM['mod_htmlpurifier']['config'] = $config->getAll();
|
||||
}
|
||||
$PHORUM['mod_htmlpurifier']['wysiwyg'] = !empty($_POST['wysiwyg']);
|
||||
$PHORUM['mod_htmlpurifier']['suppress_message'] = !empty($_POST['suppress_message']);
|
||||
if(!phorum_htmlpurifier_commit_settings()){
|
||||
$error="Database error while updating settings.";
|
||||
} else {
|
||||
echo "Settings Updated<br />";
|
||||
}
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_commit_settings()
|
||||
{
|
||||
global $PHORUM;
|
||||
return phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"]));
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
|
||||
// ATTENTION! DO NOT EDIT THIS FILE!
|
||||
// This file is necessary to run the unit tests and profiling scripts.
|
||||
// Please copy it to 'test-settings.php' and make the necessary edits.
|
||||
|
||||
// Note: The only external library you *need* is SimpleTest; everything else
|
||||
// is optional.
|
||||
|
||||
// We've got a lot of tests, so we recommend turning the limit off.
|
||||
set_time_limit(0);
|
||||
|
||||
// Turning off output buffering will prevent mysterious errors from core dumps.
|
||||
$data = @ob_get_clean();
|
||||
if ($data !== false && $data !== '') {
|
||||
echo "Output buffer contains data [".urlencode($data)."]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// REQUIRED SETTINGS
|
||||
|
||||
// Note on running SimpleTest:
|
||||
// You want the Git copy of SimpleTest, found here:
|
||||
// https://github.com/simpletest/simpletest/
|
||||
//
|
||||
// If SimpleTest is borked with HTML Purifier, please contact me or
|
||||
// the SimpleTest devs; I am a developer for SimpleTest so I should be
|
||||
// able to quickly assess a fix. SimpleTest's problem is my problem!
|
||||
|
||||
// Where is SimpleTest located? Remember to include a trailing slash!
|
||||
$simpletest_location = '/path/to/simpletest/';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// OPTIONAL SETTINGS
|
||||
|
||||
// Note on running PHPT:
|
||||
// Vanilla PHPT from https://github.com/tswicegood/PHPT_Core should
|
||||
// work fine on Linux w/o multitest.
|
||||
//
|
||||
// To do multitest or Windows testing, you'll need some more
|
||||
// patches at https://github.com/ezyang/PHPT_Core
|
||||
//
|
||||
// I haven't tested the Windows setup in a while so I don't know if
|
||||
// it still works.
|
||||
|
||||
// Should PHPT tests be enabled?
|
||||
$GLOBALS['HTMLPurifierTest']['PHPT'] = false;
|
||||
|
||||
// If PHPT isn't in your Path via PEAR, set that here:
|
||||
// set_include_path('/path/to/phpt/Core/src' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
// Where is CSSTidy located? (Include trailing slash. Leave false to disable.)
|
||||
$csstidy_location = false;
|
||||
|
||||
// For tests/multitest.php, which versions to test?
|
||||
$versions_to_test = array();
|
||||
|
||||
// Stable PHP binary to use when invoking maintenance scripts.
|
||||
$php = 'php';
|
||||
|
||||
// For tests/multitest.php, what is the multi-version executable? It must
|
||||
// accept an extra parameter (version number) before all other arguments
|
||||
$phpv = false;
|
||||
|
||||
// Should PEAR tests be run? If you've got a valid PEAR installation, set this
|
||||
// to true (or, if it's not in the include path, to its install directory).
|
||||
$GLOBALS['HTMLPurifierTest']['PEAR'] = false;
|
||||
|
||||
// If PEAR is enabled, what PEAR tests should be run? (Note: you will
|
||||
// need to ensure these libraries are installed)
|
||||
$GLOBALS['HTMLPurifierTest']['Net_IDNA2'] = true;
|
||||
|
||||
// vim: et sw=4 sts=4
|
|
@ -1,72 +0,0 @@
|
|||
<?php
|
||||
|
||||
// This file is the configuration for Travis testing.
|
||||
|
||||
// Note: The only external library you *need* is SimpleTest; everything else
|
||||
// is optional.
|
||||
|
||||
// We've got a lot of tests, so we recommend turning the limit off.
|
||||
set_time_limit(0);
|
||||
|
||||
// Turning off output buffering will prevent mysterious errors from core dumps.
|
||||
$data = @ob_get_clean();
|
||||
if ($data !== false && $data !== '') {
|
||||
echo "Output buffer contains data [".urlencode($data)."]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// REQUIRED SETTINGS
|
||||
|
||||
// Note on running SimpleTest:
|
||||
// You want the Git copy of SimpleTest, found here:
|
||||
// https://github.com/simpletest/simpletest/
|
||||
//
|
||||
// If SimpleTest is borked with HTML Purifier, please contact me or
|
||||
// the SimpleTest devs; I am a developer for SimpleTest so I should be
|
||||
// able to quickly assess a fix. SimpleTest's problem is my problem!
|
||||
|
||||
// Where is SimpleTest located? Remember to include a trailing slash!
|
||||
$simpletest_location = dirname(__FILE__) . '/simpletest/';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// OPTIONAL SETTINGS
|
||||
|
||||
// Note on running PHPT:
|
||||
// Vanilla PHPT from https://github.com/tswicegood/PHPT_Core should
|
||||
// work fine on Linux w/o multitest.
|
||||
//
|
||||
// To do multitest or Windows testing, you'll need some more
|
||||
// patches at https://github.com/ezyang/PHPT_Core
|
||||
//
|
||||
// I haven't tested the Windows setup in a while so I don't know if
|
||||
// it still works.
|
||||
|
||||
// Should PHPT tests be enabled?
|
||||
$GLOBALS['HTMLPurifierTest']['PHPT'] = false;
|
||||
|
||||
// If PHPT isn't in your Path via PEAR, set that here:
|
||||
// set_include_path('/path/to/phpt/Core/src' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
// Where is CSSTidy located? (Include trailing slash. Leave false to disable.)
|
||||
$csstidy_location = false;
|
||||
|
||||
// For tests/multitest.php, which versions to test?
|
||||
$versions_to_test = array();
|
||||
|
||||
// Stable PHP binary to use when invoking maintenance scripts.
|
||||
$php = 'php';
|
||||
|
||||
// For tests/multitest.php, what is the multi-version executable? It must
|
||||
// accept an extra parameter (version number) before all other arguments
|
||||
$phpv = false;
|
||||
|
||||
// Should PEAR tests be run? If you've got a valid PEAR installation, set this
|
||||
// to true (or, if it's not in the include path, to its install directory).
|
||||
$GLOBALS['HTMLPurifierTest']['PEAR'] = false;
|
||||
|
||||
// If PEAR is enabled, what PEAR tests should be run? (Note: you will
|
||||
// need to ensure these libraries are installed)
|
||||
$GLOBALS['HTMLPurifierTest']['Net_IDNA2'] = true;
|
||||
|
||||
// vim: et sw=4 sts=4
|
110
vendor/ezyang/htmlpurifier/update-for-release
vendored
110
vendor/ezyang/htmlpurifier/update-for-release
vendored
|
@ -1,110 +0,0 @@
|
|||
<?php
|
||||
|
||||
// release script
|
||||
// PHP 5.0 only
|
||||
|
||||
if (php_sapi_name() != 'cli') {
|
||||
echo 'Release script cannot be called from web-browser.';
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo
|
||||
'php release.php [version]
|
||||
HTML Purifier release script
|
||||
';
|
||||
exit;
|
||||
}
|
||||
|
||||
$version = trim($argv[1]);
|
||||
|
||||
// Bump version numbers:
|
||||
|
||||
// ...in VERSION
|
||||
file_put_contents('VERSION', $version);
|
||||
|
||||
// ...in NEWS
|
||||
if ($is_dev = (strpos($version, 'dev') === false)) {
|
||||
$date = date('Y-m-d');
|
||||
$news_c = str_replace(
|
||||
$l = "$version, unknown release date",
|
||||
"$version, released $date",
|
||||
file_get_contents('NEWS'),
|
||||
$c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update NEWS, missing ' . $l . PHP_EOL;
|
||||
exit;
|
||||
} elseif ($c > 1) {
|
||||
echo 'More than one release declaration in NEWS replaced' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
file_put_contents('NEWS', $news_c);
|
||||
}
|
||||
|
||||
// ...in Doxyfile
|
||||
$doxyfile_c = preg_replace(
|
||||
'/(?<=PROJECT_NUMBER {9}= )[^\s]+/m', // brittle
|
||||
$version,
|
||||
file_get_contents('Doxyfile'),
|
||||
1, $c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update Doxyfile, missing PROJECT_NUMBER.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
file_put_contents('Doxyfile', $doxyfile_c);
|
||||
|
||||
// ...in HTMLPurifier.php
|
||||
$htmlpurifier_c = file_get_contents('library/HTMLPurifier.php');
|
||||
$htmlpurifier_c = preg_replace(
|
||||
'/HTML Purifier .+? - /',
|
||||
"HTML Purifier $version - ",
|
||||
$htmlpurifier_c,
|
||||
1, $c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update HTMLPurifier.php, missing HTML Purifier [version] header.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
$htmlpurifier_c = preg_replace(
|
||||
'/public \$version = \'.+?\';/',
|
||||
"public \$version = '$version';",
|
||||
$htmlpurifier_c,
|
||||
1, $c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update HTMLPurifier.php, missing public $version.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
$htmlpurifier_c = preg_replace(
|
||||
'/const VERSION = \'.+?\';/',
|
||||
"const VERSION = '$version';",
|
||||
$htmlpurifier_c,
|
||||
1, $c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update HTMLPurifier.php, missing const $version.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
file_put_contents('library/HTMLPurifier.php', $htmlpurifier_c);
|
||||
|
||||
$config_c = file_get_contents('library/HTMLPurifier/Config.php');
|
||||
$config_c = preg_replace(
|
||||
'/public \$version = \'.+?\';/',
|
||||
"public \$version = '$version';",
|
||||
$config_c,
|
||||
1, $c
|
||||
);
|
||||
if (!$c) {
|
||||
echo 'Could not update Config.php, missing public $version.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
file_put_contents('library/HTMLPurifier/Config.php', $config_c);
|
||||
|
||||
passthru('maintenance/flush.sh');
|
||||
|
||||
if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL;
|
||||
else echo "Numbers updated to dev, no other modifications necessary!";
|
||||
|
||||
// vim: et sw=4 sts=4
|
13
vendor/guzzlehttp/guzzle/CHANGELOG.md
vendored
13
vendor/guzzlehttp/guzzle/CHANGELOG.md
vendored
|
@ -1,5 +1,13 @@
|
|||
# Change Log
|
||||
|
||||
## 6.5.5 - 2020-06-16
|
||||
|
||||
* Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
|
||||
|
||||
## 6.5.4 - 2020-05-25
|
||||
|
||||
* Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
|
||||
|
||||
## 6.5.3 - 2020-04-18
|
||||
|
||||
* Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
|
||||
|
@ -19,7 +27,10 @@
|
|||
* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
|
||||
* Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
|
||||
* Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
|
||||
* Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
|
||||
* Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
|
||||
Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
|
||||
**After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
|
||||
`Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
|
||||
* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
|
||||
* Deprecated `ClientInterface::VERSION`
|
||||
|
||||
|
|
2
vendor/guzzlehttp/guzzle/composer.json
vendored
2
vendor/guzzlehttp/guzzle/composer.json
vendored
|
@ -23,7 +23,7 @@
|
|||
"require": {
|
||||
"php": ">=5.5",
|
||||
"ext-json": "*",
|
||||
"symfony/polyfill-intl-idn": "^1.11",
|
||||
"symfony/polyfill-intl-idn": "^1.17.0",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.6.1"
|
||||
},
|
||||
|
|
9
vendor/guzzlehttp/guzzle/src/Client.php
vendored
9
vendor/guzzlehttp/guzzle/src/Client.php
vendored
|
@ -2,7 +2,7 @@
|
|||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
@ -47,9 +47,8 @@ class Client implements ClientInterface
|
|||
* wire. The function is called with a Psr7\Http\Message\RequestInterface
|
||||
* and array of transfer options, and must return a
|
||||
* GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
|
||||
* Psr7\Http\Message\ResponseInterface on success. "handler" is a
|
||||
* constructor only option that cannot be overridden in per/request
|
||||
* options. If no handler is provided, a default handler will be created
|
||||
* Psr7\Http\Message\ResponseInterface on success.
|
||||
* If no handler is provided, a default handler will be created
|
||||
* that enables all of the request options below by attaching all of the
|
||||
* default middleware to the handler.
|
||||
* - base_uri: (string|UriInterface) Base URI of the client that is merged
|
||||
|
@ -489,7 +488,7 @@ class Client implements ClientInterface
|
|||
/**
|
||||
* Throw Exception with pre-set message.
|
||||
* @return void
|
||||
* @throws InvalidArgumentException Invalid body.
|
||||
* @throws \InvalidArgumentException Invalid body.
|
||||
*/
|
||||
private function invalidBody()
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ interface ClientInterface
|
|||
/**
|
||||
* @deprecated Will be removed in Guzzle 7.0.0
|
||||
*/
|
||||
const VERSION = '6.5.3';
|
||||
const VERSION = '6.5.5';
|
||||
|
||||
/**
|
||||
* Send an HTTP request.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use GuzzleHttp\Promise as P;
|
||||
use GuzzleHttp\Promise\Promise;
|
||||
use GuzzleHttp\Utils;
|
||||
|
|
33
vendor/guzzlehttp/guzzle/src/Utils.php
vendored
33
vendor/guzzlehttp/guzzle/src/Utils.php
vendored
|
@ -3,6 +3,7 @@ namespace GuzzleHttp;
|
|||
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Symfony\Polyfill\Intl\Idn\Idn;
|
||||
|
||||
final class Utils
|
||||
{
|
||||
|
@ -30,10 +31,7 @@ final class Utils
|
|||
public static function idnUriConvert(UriInterface $uri, $options = 0)
|
||||
{
|
||||
if ($uri->getHost()) {
|
||||
$idnaVariant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : 0;
|
||||
$asciiHost = $idnaVariant === 0
|
||||
? idn_to_ascii($uri->getHost(), $options)
|
||||
: idn_to_ascii($uri->getHost(), $options, $idnaVariant, $info);
|
||||
$asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
|
||||
if ($asciiHost === false) {
|
||||
$errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
|
||||
|
||||
|
@ -64,4 +62,31 @@ final class Utils
|
|||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $domain
|
||||
* @param int $options
|
||||
* @param array $info
|
||||
*
|
||||
* @return string|false
|
||||
*/
|
||||
private static function idnToAsci($domain, $options, &$info = [])
|
||||
{
|
||||
if (\preg_match('%^[ -~]+$%', $domain) === 1) {
|
||||
return $domain;
|
||||
}
|
||||
|
||||
if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
|
||||
}
|
||||
|
||||
/*
|
||||
* The Idn class is marked as @internal. Verify that class and method exists.
|
||||
*/
|
||||
if (method_exists(Idn::class, 'idn_to_ascii')) {
|
||||
return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
|
||||
}
|
||||
|
||||
throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
|
||||
}
|
||||
}
|
||||
|
|
16
vendor/jbroadway/urlify/.travis.yml
vendored
16
vendor/jbroadway/urlify/.travis.yml
vendored
|
@ -1,16 +0,0 @@
|
|||
language: php
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4snapshot
|
||||
|
||||
before_script:
|
||||
- composer install --no-interaction --prefer-source
|
||||
- if [ "$(phpenv version-name)" == 7.3 ]; then travis_retry composer require phpstan/phpstan; fi
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-text --verbose
|
||||
- if [ "$(phpenv version-name)" == 7.3 ]; then php vendor/bin/phpstan analyse; fi
|
24
vendor/jbroadway/urlify/README.md
vendored
24
vendor/jbroadway/urlify/README.md
vendored
|
@ -1,9 +1,15 @@
|
|||
# URLify for PHP [![Build Status](https://travis-ci.org/jbroadway/urlify.png)](https://travis-ci.org/jbroadway/urlify)
|
||||
|
||||
A PHP port of [URLify.js](https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js)
|
||||
from the Django project. Handles symbols from Latin languages as well as Arabic, Azerbaijani, Czech, German, Greek, Kazakh,
|
||||
Latvian, Lithuanian, Persian, Polish, Romanian, Bulgarian, Russian, Serbian, Turkish, Ukrainian, Vietnamese and Slovak. Symbols it cannot
|
||||
transliterate it will simply omit.
|
||||
A fast PHP slug generator and transliteration library, started as a PHP port of
|
||||
[URLify.js](https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js)
|
||||
from the Django project.
|
||||
|
||||
Handles symbols from latin languages, Arabic, Azerbaijani, Bulgarian, Burmese, Croatian, Czech, Danish, Esperanto,
|
||||
Estonian, Finnish, French, Switzerland (French), Austrian (French), Georgian, German, Switzerland (German),
|
||||
Austrian (German), Greek, Hindi, Kazakh, Latvian, Lithuanian, Norwegian, Persian, Polish, Romanian, Russian, Swedish,
|
||||
Serbian, Slovak, Turkish, Ukrainian and Vietnamese, and many other via `ASCII::to_transliterate()`.
|
||||
|
||||
Symbols it cannot transliterate it can omit or replace with a specified character.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -15,15 +21,21 @@ $ composer require jbroadway/urlify
|
|||
|
||||
## Usage
|
||||
|
||||
First, include Composer's autoloader:
|
||||
|
||||
```php
|
||||
require_once 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
To generate slugs for URLs:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
echo URLify::filter (' J\'étudie le français ');
|
||||
echo URLify::slug (' J\'étudie le français ');
|
||||
// "jetudie-le-francais"
|
||||
|
||||
echo URLify::filter ('Lo siento, no hablo español.');
|
||||
echo URLify::slug ('Lo siento, no hablo español.');
|
||||
// "lo-siento-no-hablo-espanol"
|
||||
```
|
||||
|
||||
|
|
22
vendor/jbroadway/urlify/URLify.php
vendored
22
vendor/jbroadway/urlify/URLify.php
vendored
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A PHP port of URLify.js from the Django project + fallback via "Portable ASCII".
|
||||
* A fast PHP slug generator and transliteration library, started as a PHP port of URLify.js
|
||||
* from the Django project + fallback via "Portable ASCII".
|
||||
*
|
||||
* - https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js
|
||||
* - https://github.com/voku/portable-ascii
|
||||
|
@ -127,6 +128,25 @@ class URLify
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a String to URL slug. Wraps <strong>filter()</strong> with a simpler
|
||||
* set of defaults for typical usage in generating blog post slugs.
|
||||
*
|
||||
* @param string $string <p>The text you want to convert.</p>
|
||||
* @param int $maxLength <p>Max. length of the output string, set to "0" (zero) to
|
||||
* disable it</p>
|
||||
* @param string $separator <p>Define a new separator for the words.</p>
|
||||
* @param string $language <p>The language you want to convert to.</p>
|
||||
*/
|
||||
public static function slug(
|
||||
string $string,
|
||||
int $maxLength = 200,
|
||||
string $separator = '-',
|
||||
string $language = 'en'
|
||||
): string {
|
||||
return self::filter ($string, $maxLength, $language, false, false, true, $separator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a String to URL.
|
||||
*
|
||||
|
|
2
vendor/jbroadway/urlify/composer.json
vendored
2
vendor/jbroadway/urlify/composer.json
vendored
|
@ -13,7 +13,7 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"php": ">=7.2.0",
|
||||
"voku/portable-ascii": "^1.4",
|
||||
"voku/stop-words": "^2.0"
|
||||
},
|
||||
|
|
8
vendor/jbroadway/urlify/phpunit.xml
vendored
8
vendor/jbroadway/urlify/phpunit.xml
vendored
|
@ -1,8 +0,0 @@
|
|||
<phpunit bootstrap="tests/bootstrap.php">
|
||||
<testsuite name="URLify Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
<logging>
|
||||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
|
||||
</logging>
|
||||
</phpunit>
|
2
vendor/jbroadway/urlify/scripts/downcode.php
vendored
2
vendor/jbroadway/urlify/scripts/downcode.php
vendored
|
@ -4,6 +4,7 @@
|
|||
// Downcode the provided argument or stdin if the argument was not present
|
||||
//
|
||||
|
||||
require_once \dirname(__DIR__) . '/vendor/autoload.php';
|
||||
require_once \dirname(__DIR__) . '/URLify.php';
|
||||
|
||||
// Print usage and exit if arguments are invalid
|
||||
|
@ -12,6 +13,7 @@ if ($argc < 1 || $argc > 2) {
|
|||
}
|
||||
|
||||
// Process the provided argument
|
||||
$piped = false;
|
||||
if ($argc === 2) {
|
||||
$s = $argv[1];
|
||||
// Or read from stdin if the argument wasn't present
|
||||
|
|
2
vendor/jbroadway/urlify/scripts/filter.php
vendored
2
vendor/jbroadway/urlify/scripts/filter.php
vendored
|
@ -4,6 +4,7 @@
|
|||
// Filter the provided argument or stdin if the argument was not present
|
||||
//
|
||||
|
||||
require_once \dirname(__DIR__) . '/vendor/autoload.php';
|
||||
require_once \dirname(__DIR__) . '/URLify.php';
|
||||
|
||||
// Print usage and exit if arguments are invalid
|
||||
|
@ -12,6 +13,7 @@ if ($argc < 1 || $argc > 2) {
|
|||
}
|
||||
|
||||
// Process the provided argument
|
||||
$piped = false;
|
||||
if ($argc === 2) {
|
||||
$s = $argv[1];
|
||||
// Or read from stdin if the argument wasn't present
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// Transliterate the provided argument or stdin if the argument was not present
|
||||
//
|
||||
|
||||
require_once \dirname(__DIR__) . '/vendor/autoload.php';
|
||||
require_once \dirname(__DIR__) . '/URLify.php';
|
||||
|
||||
// Print usage and exit if arguments are invalid
|
||||
|
@ -12,6 +13,7 @@ if ($argc < 1 || $argc > 2) {
|
|||
}
|
||||
|
||||
// Process the provided argument
|
||||
$piped = false;
|
||||
if ($argc === 2) {
|
||||
$s = $argv[1];
|
||||
// Or read from stdin if the argument wasn't present
|
||||
|
|
2
vendor/league/flysystem/src/Filesystem.php
vendored
2
vendor/league/flysystem/src/Filesystem.php
vendored
|
@ -301,7 +301,7 @@ class Filesystem implements FilesystemInterface
|
|||
return false;
|
||||
}
|
||||
|
||||
return $object['timestamp'];
|
||||
return (int) $object['timestamp'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,7 +87,7 @@ interface FilesystemInterface
|
|||
*
|
||||
* @throws FileNotFoundException
|
||||
*
|
||||
* @return string|false The timestamp or false on failure.
|
||||
* @return int|false The timestamp or false on failure.
|
||||
*/
|
||||
public function getTimestamp($path);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue