From baa071dbbbdc88e251128b84bfad159986f1a0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 13 Jan 2021 14:46:54 +0100 Subject: [PATCH] Fix NL replace (do not replace \r\n with two spaces) --- src/Selenium2Driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index 11f911a9..917a4a47 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -638,8 +638,8 @@ public function getTagName(string $xpath) public function getText(string $xpath) { - return (string) str_replace( - array("\r", "\r\n", "\n"), + return str_replace( + array("\r\n", "\r", "\n"), ' ', $this->executeJsOnXpath($xpath, 'return {{ELEMENT}}.innerText;') );