Prevent smileys being translated by the browser
authorAlexander Ebert <ebert@woltlab.com>
Fri, 28 Jul 2023 11:40:37 +0000 (13:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 28 Jul 2023 11:40:37 +0000 (13:40 +0200)
See https://www.woltlab.com/community/thread/300836-problem-with-the-editor-and-chrome-s-translation-function/

wcfsetup/install/files/lib/data/smiley/Smiley.class.php

index dfd4ebdc01036b159d1e15e9a6b3ac37a0a5411d..ee129f663af36e5febaee7dcb3d3100126d99e63 100644 (file)
@@ -136,7 +136,7 @@ class Smiley extends DatabaseObject implements ITitledObject
         $width = ($this->getWidth()) ? ' width="' . $this->getWidth() . '"' : '';
 
         return \sprintf(
-            '<img src="%s" alt="%s" title="%s" class="%s" %s %s %s loading="eager">',
+            '<img src="%s" alt="%s" title="%s" class="%s" %s %s %s loading="eager" translate="no">',
             StringUtil::encodeHTML($this->getURL()),
             StringUtil::encodeHTML($this->smileyCode),
             StringUtil::encodeHTML(WCF::getLanguage()->get($this->smileyTitle)),