Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
ef6c1828
...
ef6c1828c7b64e1cf99b98e27600d0b63308cad3
authored
2012-10-20 00:09:35 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed edge case when current url couldn't be decoded
1 parent
541fba3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
modules/casper.js
modules/casper.js
View file @
ef6c182
...
...
@@ -742,9 +742,14 @@ Casper.prototype.getPageContent = function getPageContent() {
*/
Casper
.
prototype
.
getCurrentUrl
=
function
getCurrentUrl
()
{
"use strict"
;
return
decodeURIComponent
(
this
.
evaluate
(
function
_evaluate
()
{
var
url
=
this
.
evaluate
(
function
_evaluate
()
{
return
document
.
location
.
href
;
}));
});
try
{
return
decodeURIComponent
(
url
);
}
catch
(
e
)
{
return
url
;
}
};
/**
...
...
Please
register
or
sign in
to post a comment