Skip to content

Commit

Permalink
Fix NL replace (do not replace \r\n with two spaces)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored and aik099 committed Nov 1, 2024
1 parent 6a2142e commit baa071d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;')
);
Expand Down

0 comments on commit baa071d

Please sign in to comment.