aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock18
-rw-r--r--phpBB/phpbb/textformatter/s9e/renderer.php6
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15261.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15261.txt1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15261.xml14
6 files changed, 27 insertions, 15 deletions
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 52217a7540..1b8de72710 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.9.0",
+ "s9e/text-formatter": "~0.10.0",
"symfony/config": "^2.8",
"symfony/console": "^2.8",
"symfony/debug": "^2.8",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 2cce1156f0..d460c6db58 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": "a66e58446c273c4b92f8e5f227180be8",
- "content-hash": "d3646acce6058e89ebcf76debb7f72ea",
+ "hash": "3b947e5d38012be6ef86609c709c7b4b",
+ "content-hash": "447fa8ed870502dc3089b0a0ffa08ef0",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -660,16 +660,16 @@
},
{
"name": "s9e/text-formatter",
- "version": "0.9.6",
+ "version": "0.10.1",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
- "reference": "077c510109f3011dec68a5bcbaeb93a1f9138128"
+ "reference": "9380fd3d3e3289d7e966bab7769ca2aae5d23f67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/077c510109f3011dec68a5bcbaeb93a1f9138128",
- "reference": "077c510109f3011dec68a5bcbaeb93a1f9138128",
+ "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/9380fd3d3e3289d7e966bab7769ca2aae5d23f67",
+ "reference": "9380fd3d3e3289d7e966bab7769ca2aae5d23f67",
"shasum": ""
},
"require": {
@@ -721,7 +721,7 @@
"parser",
"shortcodes"
],
- "time": "2017-05-10 19:37:30"
+ "time": "2017-07-03 13:55:54"
},
{
"name": "symfony/config",
@@ -2825,9 +2825,7 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
+ "email": "fabien@symfony.com"
}
],
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php
index 9be20b7f53..6fcd2b0a98 100644
--- a/phpBB/phpbb/textformatter/s9e/renderer.php
+++ b/phpBB/phpbb/textformatter/s9e/renderer.php
@@ -247,14 +247,12 @@ class renderer implements \phpbb\textformatter\renderer_interface
$vars = array('renderer', 'xml');
extract($this->dispatcher->trigger_event('core.text_formatter_s9e_render_before', compact($vars)));
+ $html = $this->renderer->render($xml);
if (isset($this->censor) && $this->viewcensors)
{
- // NOTE: censorHtml() is XML-safe
- $xml = $this->censor->censorHtml($xml, true);
+ $html = $this->censor->censorHtml($html, true);
}
- $html = $this->renderer->render($xml);
-
/**
* Modify a rendered text
*
diff --git a/tests/text_processing/tickets_data/PHPBB3-15261.html b/tests/text_processing/tickets_data/PHPBB3-15261.html
new file mode 100644
index 0000000000..b563052b47
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15261.html
@@ -0,0 +1 @@
+foo **** baz \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15261.txt b/tests/text_processing/tickets_data/PHPBB3-15261.txt
new file mode 100644
index 0000000000..a8c4a05c10
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15261.txt
@@ -0,0 +1 @@
+foo <bar> baz \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15261.xml b/tests/text_processing/tickets_data/PHPBB3-15261.xml
new file mode 100644
index 0000000000..c0d0f395a1
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15261.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_words">
+ <column>word_id</column>
+ <column>word</column>
+ <column>replacement</column>
+
+ <row>
+ <value>1</value>
+ <value>&lt;*&gt;</value>
+ <value>****</value>
+ </row>
+ </table>
+</dataset>