ng.'); } $string = \preg_replace_callback('#[^a-zA-Z0-9,\\._]#Su', function ($matches) { $char = $matches[0]; static $shortMap = ['\\' => '\\\\', '/' => '\\/', "\x08" => '\\b', "\f" => '\\f', "\n" => '\\n', "\r" => '\\r', "\t" => '\\t']; if (isset($shortMap[$char])) { return $shortMap[$char]; } $codepoint = \mb_ord($char, 'UTF-8'); if (0x10000 > $codepoint) { return \sprintf('\\u%04X', $codepoint); } // Split characters outside the BMP into surrogate pairs // https://tools.ietf.org/html/rfc2781.html#section-2.1 $u = $codepoint - 0x10000; $high = 0xd800 | $u >> 10; $low = 0xdc00 | $u & 0x3ff; return \sprintf('\\u%04X\\u%04X', $high, $low); }, $string); if ('UTF-8' !== $charset) { $string = \iconv('UTF-8', $charset, $string); } return $string; case 'css': if ('UTF-8' !== $charset) { $string = $this->convertEncoding($string, 'UTF-8', $charset); } if (!\preg_match('//u', $string)) { throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); } $string = \preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) { $char = $matches[0]; return \sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : \mb_ord($char, 'UTF-8')); }, $string); if ('UTF-8' !== $charset) { $string = \iconv('UTF-8', $charset, $string); } return $string; case 'html_attr': if ('UTF-8' !== $charset) { $string = $this->convertEncoding($string, 'UTF-8', $charset); } if (!\preg_match('//u', $string)) { throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); } $string = \preg_replace_callback('#[^a-zA-Z0-9,\\.\\-_]#Su', function ($matches) { $chr = $matches[0]; $ord = \ord($chr); if ($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr || $ord >= 0x7f && $ord <= 0x9f) { return '�'; } if (1 === \strlen($chr)) { static $entityMap = [ 34 => '"', 38 => '&', 60 => '<', 62 => '>', ]; if (isset($entityMap[$ord])) { return $entityMap[$ord]; } return \sprintf('&#x%02X;', $ord); } return \sprintf('&#x%04X;', \mb_ord($chr, 'UTF-8')); }, $string); if ('UTF-8' !== $charset) { $string = \iconv('UTF-8', $charset, $string); } return $string; case 'url': return \rawurlencode($string); default: if (\array_key_exists($strategy, $this->escapers)) { return $this->escapers[$strategy]($string, $charset); } $validStrategies = \implode('", "', \array_merge(['html', 'js', 'url', 'css', 'html_attr'], \array_keys($this->escapers))); throw new RuntimeError(\sprintf('Invalid escaping strategy "%s" (valid ones: "%s").', $strategy, $validStrategies)); } } private function convertEncoding(string $string, string $to, string $from) { if (!\function_exists('iconv')) { throw new RuntimeError('Unable to convert encoding: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); } return \iconv($from, $to, $string); } }
Fatal error: Uncaught Error: Class "MailPoetVendor\Twig\Runtime\EscaperRuntime" not found in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Environment.php:68 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php(17): MailPoetVendor\Twig\Environment->MailPoetVendor\Twig\{closure}() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Environment.php(322): MailPoetVendor\Twig\RuntimeLoader\FactoryRuntimeLoader->load('MailPoetVendor\\...') #2 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Extension/EscaperExtension.php(40): MailPoetVendor\Twig\Environment->getRuntime('MailPoetVendor\\...') #3 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Environment.php(72): MailPoetVendor\Twig\Extension\EscaperExtension->setEnvironment(Object(MailPoet\Config\TwigEnvironment), false) #4 /htdocs/wp-content/plugins/mailpoet/lib/Config/Renderer.php(29): MailPoetVendor\Twig\Environment->__construct(Object(MailPoetVendor\Twig\Loader\FilesystemLoader), Array) #5 /htdocs/wp-content/plugins/mailpoet/lib/Config/RendererFactory.php(19): MailPoet\Config\Renderer->__construct(false, '/htdocs/wp-cont...', Object(MailPoetVendor\Twig\Loader\FilesystemLoader), false) #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2683): MailPoet\Config\RendererFactory->getRenderer() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2637): MailPoetGenerated\FreeCachedContainer->getRendererService() #8 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #9 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #10 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #11 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #12 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #13 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #14 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #15 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #16 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #17 /htdocs/index.php(17): require('/htdocs/wp-blog...') #18 {main} thrown in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Environment.php on line 68