aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter
diff options
context:
space:
mode:
authorJoshyPHP <JoshyPHP@users.noreply.github.com>2018-12-29 11:12:04 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-12-29 11:23:47 +0100
commite9310c928e8531a560d3034dba2db1a0d2f9a395 (patch)
tree250489bcd62fa7e461b4cd3b21e836c1a8967727 /phpBB/phpbb/textformatter
parentc51859c0bdaf1997efb6a8d792628bd35165bfec (diff)
downloadforums-e9310c928e8531a560d3034dba2db1a0d2f9a395.tar
forums-e9310c928e8531a560d3034dba2db1a0d2f9a395.tar.gz
forums-e9310c928e8531a560d3034dba2db1a0d2f9a395.tar.bz2
forums-e9310c928e8531a560d3034dba2db1a0d2f9a395.tar.xz
forums-e9310c928e8531a560d3034dba2db1a0d2f9a395.zip
[ticket/15921] Use backward compatible template for emojis
PHPBB3-15921
Diffstat (limited to 'phpBB/phpbb/textformatter')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index d491a7180b..6191b9a315 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -354,7 +354,14 @@ class factory implements \phpbb\textformatter\cache_interface
// Load the Emoji plugin and modify its tag's template to obey viewsmilies
$tag = $configurator->Emoji->getTag();
- $tag->template = '<img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>';
+ $tag->template = '<xsl:choose>
+ <xsl:when test="@tseq">
+ <img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <img alt="{.}" class="emoji" draggable="false" src="https://cdn.jsdelivr.net/gh/s9e/emoji-assets-twemoji@11.2/dist/svgz/{@seq}.svgz"/>
+ </xsl:otherwise>
+ </xsl:choose>';
$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>';
/**