Fixed avatar scaling in IE11
authorAlexander Ebert <ebert@woltlab.com>
Wed, 22 Nov 2017 15:20:41 +0000 (16:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 22 Nov 2017 15:20:41 +0000 (16:20 +0100)
wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php

index 094863f33d2ba0cd379ac923f51620ce78118aa5..6d14c39746055f7f259fd54a4db077751c53d1d2 100644 (file)
@@ -56,7 +56,7 @@ class DefaultAvatar implements IUserAvatar {
                        
                        // the <path> is basically a shorter version of a <rect>
                        $svg = <<<SVG
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#{$backgroundColor}" d="M0 0h16v16H0z"/><text x="8" y="8" fill="#{$textColor}" text-anchor="middle" dy=".3em" font-family="Arial" font-size="7">{$text}</text></svg>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="#{$backgroundColor}" d="M0 0h16v16H0z"/><text x="8" y="8" fill="#{$textColor}" text-anchor="middle" dy=".3em" font-family="Arial" font-size="7">{$text}</text></svg>
 SVG;
                        
                        $this->src = "data:image/svg+xml;base64," . base64_encode($svg);