File ManagerCurrent Directory: wp-content/plugins/wpforms/vendor_prefixed/symfony/css-selector/Parser/TokenizerLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: TokenizerEscaping.php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPForms\Vendor\Symfony\Component\CssSelector\Parser\Tokenizer; /** * CSS selector tokenizer escaping applier. * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> * * @internal */ class TokenizerEscaping { private $patterns; public function __construct(TokenizerPatterns $patterns) { $this->patterns = $patterns; } /** * @param string $value * * @return string */ public function escapeUnicode($value) { $value = $this->replaceUnicodeSequences($value); return \preg_replace($this->patterns->getSimpleEscapePattern(), '$1', $value); } /** * @param string $value * * @return string */ public function escapeUnicodeAndNewLine($value) { $value = \preg_replace($this->patterns->getNewLineEscapePattern(), '', $value); return $this->escapeUnicode($value); } /** * @param string $value * * @return string */ private function replaceUnicodeSequences($value) { return \preg_replace_callback($this->patterns->getUnicodeEscapePattern(), function ($match) { $c = \hexdec($match[1]); if (0x80 > ($c %= 0x200000)) { return \chr($c); } if (0x800 > $c) { return \chr(0xc0 | $c >> 6) . \chr(0x80 | $c & 0x3f); } if (0x10000 > $c) { return \chr(0xe0 | $c >> 12) . \chr(0x80 | $c >> 6 & 0x3f) . \chr(0x80 | $c & 0x3f); } return ''; }, $value); } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirTokenizer.phpFile1.97 KB Rename | Delete | EditTokenizerEscaping.phpFile1.92 KB Rename | Delete | EditTokenizerPatterns.phpFile3.03 KB Rename | Delete | Edit