Merge pull request #4401 from JoshyPHP/ticket/14734

[ticket/14734] Use SVG emoji
This commit is contained in:
Marc Alexander 2016-08-05 20:18:50 +02:00
commit 801183a99b
2 changed files with 2 additions and 1 deletions

View file

@ -349,6 +349,7 @@ class factory implements \phpbb\textformatter\cache_interface
// Load the Emoji plugin and modify its tag's template to obey viewsmilies // Load the Emoji plugin and modify its tag's template to obey viewsmilies
$configurator->Emoji->setImageSize(18); $configurator->Emoji->setImageSize(18);
$configurator->Emoji->useSVG();
$tag = $configurator->Emoji->getTag(); $tag = $configurator->Emoji->getTag();
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>'; $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';

View file

@ -298,7 +298,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
), ),
array( array(
"Emoji: \xF0\x9F\x98\x80", "Emoji: \xF0\x9F\x98\x80",
'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="smilies" draggable="false" width="18" height="18" src="//twemoji.maxcdn.com/36x36/1f600.png">' 'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="smilies" draggable="false" width="18" height="18" src="//twemoji.maxcdn.com/svg/1f600.svg">'
), ),
array( array(
"Emoji: \xF0\x9F\x98\x80", "Emoji: \xF0\x9F\x98\x80",