Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
visit no longer tries to fix invalid URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
pgieser authored and halogenandtoast committed Jan 13, 2012
1 parent 5adab74 commit fccb444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions spec/driver_spec.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Visit.cpp
Expand Up @@ -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));
}

Expand Down

0 comments on commit fccb444

Please sign in to comment.