Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

visit no longer tries to fix invalid URLs

  • Loading branch information...
commit fccb444816269b477d7529a94f79d9e1bcad1fac 1 parent 5adab74
@pgieser pgieser authored halogenandtoast committed
Showing with 4 additions and 4 deletions.
  1. +3 −3 spec/driver_spec.rb
  2. +1 −1  src/Visit.cpp
View
6 spec/driver_spec.rb
@@ -223,9 +223,9 @@
subject.current_url.should == "http://127.0.0.1:#{port}/hello/world?success=true"
end
- it "escapes URLs" do
- subject.visit("/hello there")
- subject.current_url.should =~ /hello%20there/
+ it "does not double-encode URLs" do
+ subject.visit("/hello/world?success=%25true")
+ subject.current_url.should =~ /success=\%25true/
end
it "visits a page with an anchor" do
View
2  src/Visit.cpp
@@ -7,7 +7,7 @@ Visit::Visit(WebPage *page, QObject *parent) : Command(page, parent) {
}
void Visit::start(QStringList &arguments) {
- QUrl requestedUrl = QUrl(arguments[0]);
+ QUrl requestedUrl = QUrl::fromEncoded(arguments[0].toUtf8(), QUrl::StrictMode);
page()->currentFrame()->load(QUrl(requestedUrl));
}
Please sign in to comment.
Something went wrong with that request. Please try again.