diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2017-12-10 02:54:38 +0100 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2017-12-10 02:55:10 +0100 |
commit | b9dce3fa65a508baa02bc66e86e68b931e0ba670 (patch) | |
tree | 12b8ca95766b529ef4049f4b48f2667712818e3f /phpBB | |
parent | 2643e851f2acfe703364d96fb00ab52c38369a5b (diff) | |
download | forums-b9dce3fa65a508baa02bc66e86e68b931e0ba670.tar forums-b9dce3fa65a508baa02bc66e86e68b931e0ba670.tar.gz forums-b9dce3fa65a508baa02bc66e86e68b931e0ba670.tar.bz2 forums-b9dce3fa65a508baa02bc66e86e68b931e0ba670.tar.xz forums-b9dce3fa65a508baa02bc66e86e68b931e0ba670.zip |
[ticket/15457] Updated s9e/text-formatter dependency
PHPBB3-15457
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/composer.json | 4 | ||||
-rw-r--r-- | phpBB/composer.lock | 20 | ||||
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/factory.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 6 |
4 files changed, 17 insertions, 18 deletions
diff --git a/phpBB/composer.json b/phpBB/composer.json index 5bc8f5dc0d..926fad5188 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -33,7 +33,7 @@ "marc1706/fast-image-size": "^1.1", "paragonie/random_compat": "^1.4", "patchwork/utf8": "^1.1", - "s9e/text-formatter": "~0.11.0", + "s9e/text-formatter": "~0.13.0", "symfony/config": "^2.8", "symfony/console": "^2.8", "symfony/debug": "^2.8", @@ -69,7 +69,7 @@ }, "config": { "platform": { - "php": "5.4" + "php": "5.4.7" } } } diff --git a/phpBB/composer.lock b/phpBB/composer.lock index c1bdf26e02..59143a1fa7 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "7c30306b2abcb79a206bf6497ef45a02", - "content-hash": "d559dd0af2317fb0fc15720a18834e33", + "hash": "f14915a2ccaf76ccd6d3ea725721a8a8", + "content-hash": "c843abc1344cd9df37f63c08a125cad0", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -661,27 +661,27 @@ }, { "name": "s9e/text-formatter", - "version": "0.11.2", + "version": "0.13.1", "source": { "type": "git", "url": "https://github.com/s9e/TextFormatter.git", - "reference": "735a56076e29348d838ce6c2658996daae86718f" + "reference": "804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/735a56076e29348d838ce6c2658996daae86718f", - "reference": "735a56076e29348d838ce6c2658996daae86718f", + "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f", + "reference": "804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f", "shasum": "" }, "require": { "ext-dom": "*", "ext-filter": "*", "lib-pcre": ">=7.2", - "php": ">=5.3.3" + "php": ">=5.4.7" }, "require-dev": { "matthiasmullie/minify": "*", - "php": ">=5.3.3", + "php": ">=5.4.7", "s9e/regexp-builder": ">=1.3.0" }, "suggest": { @@ -722,7 +722,7 @@ "parser", "shortcodes" ], - "time": "2017-10-02 16:58:51" + "time": "2017-12-10 00:55:53" }, { "name": "symfony/config", @@ -3577,6 +3577,6 @@ }, "platform-dev": [], "platform-overrides": { - "php": "5.4" + "php": "5.4.7" } } diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 15d0a5e3e5..1548b17945 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -266,7 +266,8 @@ class factory implements \phpbb\textformatter\cache_interface ->addParameterByName('logger') ->addParameterByName('max_img_height') ->addParameterByName('max_img_width') - ->markAsSafeAsURL(); + ->markAsSafeAsURL() + ->setJS('UrlFilter.filter'); // Add default BBCodes foreach ($this->get_default_bbcodes($configurator) as $bbcode) @@ -355,8 +356,6 @@ class factory implements \phpbb\textformatter\cache_interface $configurator->registeredVars['max_img_width'] = 0; // Load the Emoji plugin and modify its tag's template to obey viewsmilies - $configurator->Emoji->omitImageSize(); - $configurator->Emoji->useSVG(); $tag = $configurator->Emoji->getTag(); $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>'; diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index 05ddfffa11..3698dca224 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -13,7 +13,7 @@ namespace phpbb\textformatter\s9e; -use s9e\TextFormatter\Parser\BuiltInFilters; +use s9e\TextFormatter\Parser\AttributeFilters\UrlFilter; use s9e\TextFormatter\Parser\Logger; /** @@ -196,7 +196,7 @@ class parser implements \phpbb\textformatter\parser_interface public function get_errors() { $errors = array(); - foreach ($this->parser->getLogger()->get() as $entry) + foreach ($this->parser->getLogger()->getLogs() as $entry) { list(, $msg, $context) = $entry; @@ -365,7 +365,7 @@ class parser implements \phpbb\textformatter\parser_interface static public function filter_img_url($url, array $url_config, Logger $logger, $max_height, $max_width) { // Validate the URL - $url = BuiltInFilters::filterUrl($url, $url_config, $logger); + $url = UrlFilter::filter($url, $url_config, $logger); if ($url === false) { return false; |