@@ -18,7 +18,7 @@ public function branches($project_id)
1818 */
1919 public function branch ($ project_id , $ branch_id )
2020 {
21- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .urlencode ($ branch_id )));
21+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .rawurlencode ($ branch_id )));
2222 }
2323
2424 /**
@@ -42,7 +42,7 @@ public function createBranch($project_id, $branch_name, $ref)
4242 */
4343 public function deleteBranch ($ project_id , $ branch_name )
4444 {
45- return $ this ->delete ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .urlencode ($ branch_name )));
45+ return $ this ->delete ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .rawurlencode ($ branch_name )));
4646 }
4747
4848 /**
@@ -52,7 +52,7 @@ public function deleteBranch($project_id, $branch_name)
5252 */
5353 public function protectBranch ($ project_id , $ branch_name )
5454 {
55- return $ this ->put ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .urlencode ($ branch_name ).'/protect ' ));
55+ return $ this ->put ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .rawurlencode ($ branch_name ).'/protect ' ));
5656 }
5757
5858 /**
@@ -62,7 +62,7 @@ public function protectBranch($project_id, $branch_name)
6262 */
6363 public function unprotectBranch ($ project_id , $ branch_name )
6464 {
65- return $ this ->put ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .urlencode ($ branch_name ).'/unprotect ' ));
65+ return $ this ->put ($ this ->getProjectPath ($ project_id , 'repository/branches/ ' .rawurlencode ($ branch_name ).'/unprotect ' ));
6666 }
6767
6868 /**
@@ -113,7 +113,7 @@ public function commits($project_id, $page = 0, $per_page = self::PER_PAGE, $ref
113113 */
114114 public function commit ($ project_id , $ sha )
115115 {
116- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .urlencode ($ sha )));
116+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .rawurlencode ($ sha )));
117117 }
118118
119119 /**
@@ -125,7 +125,7 @@ public function commit($project_id, $sha)
125125 */
126126 public function commitComments ($ project_id , $ sha , $ page = 0 , $ per_page = self ::PER_PAGE )
127127 {
128- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .urlencode ($ sha ).'/comments ' ), array (
128+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .rawurlencode ($ sha ).'/comments ' ), array (
129129 'page ' => $ page ,
130130 'per_page ' => $ per_page
131131 ));
@@ -142,7 +142,7 @@ public function createCommitComment($project_id, $sha, $note, array $params = ar
142142 {
143143 $ params ['note ' ] = $ note ;
144144
145- return $ this ->post ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .urlencode ($ sha ).'/comments ' ), $ params );
145+ return $ this ->post ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .rawurlencode ($ sha ).'/comments ' ), $ params );
146146 }
147147
148148 /**
@@ -155,7 +155,7 @@ public function compare($project_id, $fromShaOrMaster, $toShaOrMaster)
155155 {
156156 return $ this ->get ($ this ->getProjectPath (
157157 $ project_id ,
158- 'repository/compare?from= ' .urlencode ($ fromShaOrMaster ).'&to= ' .urlencode ($ toShaOrMaster )
158+ 'repository/compare?from= ' .rawurlencode ($ fromShaOrMaster ).'&to= ' .rawurlencode ($ toShaOrMaster )
159159 ));
160160 }
161161
@@ -166,7 +166,7 @@ public function compare($project_id, $fromShaOrMaster, $toShaOrMaster)
166166 */
167167 public function diff ($ project_id , $ sha )
168168 {
169- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .urlencode ($ sha ).'/diff ' ));
169+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .rawurlencode ($ sha ).'/diff ' ));
170170 }
171171
172172 /**
@@ -187,7 +187,7 @@ public function tree($project_id, array $params = array())
187187 */
188188 public function blob ($ project_id , $ sha , $ filepath )
189189 {
190- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .urlencode ($ sha ).'/blob ' ), array (
190+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/commits/ ' .rawurlencode ($ sha ).'/blob ' ), array (
191191 'filepath ' => $ filepath
192192 ));
193193 }
0 commit comments