symfony/symfony — Issue #2599: DOMCrawler fails to parse action with carriage returns
Author: greg0ire
Created: 2011-11-10 10:24:03+00:00
State: open

this test fails because of the carriage return in the action url :

```php

';
$crawler = new Crawler($html, 'http://example.com/whatever.html');
$form = $crawler->selectButton('mybutton')->form();
$actual = $form->getUri(); // bug: http://example.com/id/#foo
$this->assertEquals('http://example.com/test.html', $actual);
}
}
```

I get this:

```
PHPUnit 3.5.14 by Sebastian Bergmann.

F

Time: 0 seconds, Memory: 8.00Mb

There was 1 failure:

1) Symfony\Tests\Component\DomCrawler\CrawlerBugTest::testFormUri
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-http://example.com/test.html
+http://example.com/
+/test.html
```