File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,7 @@ function apiURL() {
105
105
if ($ this ->quality ) $ options [] = 'quality= ' . $ this ->quality ;
106
106
if ($ this ->timeout ) $ options [] = 'timeout= ' . $ this ->timeout ;
107
107
108
- $ imageURL = $ this ->url ;
109
- if (preg_match ('/[\s%+]/ ' , $ imageURL )) {
110
- $ imageURL = rawurlencode ($ imageURL );
111
- }
112
-
113
- return self ::BASE_URL . '/ ' . rawurlencode ($ this ->username ) . '/ ' . implode (', ' , $ options ) . '/ ' . $ imageURL ;
108
+ return self ::BASE_URL . '/ ' . rawurlencode ($ this ->username ) . '/ ' . implode (', ' , $ options ) . '/ ' . rawurlencode ($ this ->url );
114
109
}
115
110
116
111
function getBytes () {
Original file line number Diff line number Diff line change @@ -87,6 +87,6 @@ public function testChains() {
87
87
$ this ->assertContains ('2x ' , $ c2 ->apiURL ());
88
88
$ this ->assertContains ('1280x300 ' , $ c1 ->apiURL ());
89
89
$ this ->assertContains ('timeout=34 ' , $ c1 ->apiURL ());
90
- $ this ->assertContains ('/http://example .com ' , $ c1 ->apiURL ());
90
+ $ this ->assertContains ('/http%3A%2F%2Fexample .com ' , $ c1 ->apiURL ());
91
91
}
92
92
}
You can’t perform that action at this time.
0 commit comments