File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ public function getValue()
63
63
return $ this ->value ;
64
64
}
65
65
66
+ /**
67
+ * @return string
68
+ */
69
+ public function getEscapedValue ()
70
+ {
71
+ return urlencode ((string )$ this ->value );
72
+ }
73
+
66
74
/**
67
75
* @param mixed $value
68
76
* @return $this
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ public function setKey($key);
34
34
*/
35
35
public function getValue ();
36
36
37
+ /**
38
+ * @return string
39
+ */
40
+ public function getEscapedValue ();
41
+
37
42
/**
38
43
* @param mixed $value
39
44
* @return $this
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ public function buildQueryString()
134
134
}
135
135
$ queryParameters = array ();
136
136
foreach ($ this ->getQueryParameters () as $ queryParameter ) {
137
- $ queryParameters [] = $ queryParameter ->getKey () . '= ' . $ queryParameter ->getValue ();
137
+ $ queryParameters [] = $ queryParameter ->getKey () . '= ' . $ queryParameter ->getEscapedValue ();
138
138
}
139
139
return implode (self ::URL_QUERY_SEPARATOR , $ queryParameters );
140
140
}
You can’t perform that action at this time.
0 commit comments