aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-01-15 00:25:28 +0100
committerMarc Alexander <admin@m-a-styles.de>2017-01-15 00:25:28 +0100
commit42e78004fbe9cce9a77f718a281d95b2c9b1e5d2 (patch)
treeb03c18978b7c83bd548a4c44cef9073ddacee991
parentb72df1f384c778c9e54d1aa74600142e224c18e6 (diff)
parent15315ac87a68834e2d560acf62756f628a26da45 (diff)
downloadforums-42e78004fbe9cce9a77f718a281d95b2c9b1e5d2.tar
forums-42e78004fbe9cce9a77f718a281d95b2c9b1e5d2.tar.gz
forums-42e78004fbe9cce9a77f718a281d95b2c9b1e5d2.tar.bz2
forums-42e78004fbe9cce9a77f718a281d95b2c9b1e5d2.tar.xz
forums-42e78004fbe9cce9a77f718a281d95b2c9b1e5d2.zip
Merge pull request #4643 from JoshyPHP/ticket/15008
[ticket/15008] Disable emoji when smilies are disabled
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15008.before.php18
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15008.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15008.txt1
4 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index e2653d60f0..05ddfffa11 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -142,6 +142,7 @@ class parser implements \phpbb\textformatter\parser_interface
public function disable_smilies()
{
$this->parser->disablePlugin('Emoticons');
+ $this->parser->disablePlugin('Emoji');
}
/**
@@ -183,6 +184,7 @@ class parser implements \phpbb\textformatter\parser_interface
public function enable_smilies()
{
$this->parser->enablePlugin('Emoticons');
+ $this->parser->enablePlugin('Emoji');
}
/**
diff --git a/tests/text_processing/tickets_data/PHPBB3-15008.before.php b/tests/text_processing/tickets_data/PHPBB3-15008.before.php
new file mode 100644
index 0000000000..a3243e74cd
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15008.before.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+function before_assert_phpbb3_15008($vars)
+{
+ extract($vars);
+ $parser->disable_smilies();
+}
diff --git a/tests/text_processing/tickets_data/PHPBB3-15008.html b/tests/text_processing/tickets_data/PHPBB3-15008.html
new file mode 100644
index 0000000000..7642eb63ee
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15008.html
@@ -0,0 +1 @@
+No smilies :) or shortnames :strawberry: \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15008.txt b/tests/text_processing/tickets_data/PHPBB3-15008.txt
new file mode 100644
index 0000000000..7642eb63ee
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15008.txt
@@ -0,0 +1 @@
+No smilies :) or shortnames :strawberry: \ No newline at end of file