Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f622d99

Browse files
authored
Merge pull request LaravelCollective#620 from fabianocouto/6.0
Add escape param in all link methods
2 parents d4c632d + 9d45eb1 commit f622d99

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

src/HtmlBuilder.php

+17-10
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,13 @@ public function link($url, $title = null, $attributes = [], $secure = null, $esc
171171
* @param string $url
172172
* @param string $title
173173
* @param array $attributes
174+
* @param bool $escape
174175
*
175176
* @return \Illuminate\Support\HtmlString
176177
*/
177-
public function secureLink($url, $title = null, $attributes = [])
178+
public function secureLink($url, $title = null, $attributes = [], $escape = true)
178179
{
179-
return $this->link($url, $title, $attributes, true);
180+
return $this->link($url, $title, $attributes, true, $escape);
180181
}
181182

182183
/**
@@ -186,14 +187,15 @@ public function secureLink($url, $title = null, $attributes = [])
186187
* @param string $title
187188
* @param array $attributes
188189
* @param bool $secure
190+
* @param bool $escape
189191
*
190192
* @return \Illuminate\Support\HtmlString
191193
*/
192-
public function linkAsset($url, $title = null, $attributes = [], $secure = null)
194+
public function linkAsset($url, $title = null, $attributes = [], $secure = null, $escape = true)
193195
{
194196
$url = $this->url->asset($url, $secure);
195197

196-
return $this->link($url, $title ?: $url, $attributes, $secure);
198+
return $this->link($url, $title ?: $url, $attributes, $secure, $escape);
197199
}
198200

199201
/**
@@ -202,12 +204,13 @@ public function linkAsset($url, $title = null, $attributes = [], $secure = null)
202204
* @param string $url
203205
* @param string $title
204206
* @param array $attributes
207+
* @param bool $escape
205208
*
206209
* @return \Illuminate\Support\HtmlString
207210
*/
208-
public function linkSecureAsset($url, $title = null, $attributes = [])
211+
public function linkSecureAsset($url, $title = null, $attributes = [], $escape = true)
209212
{
210-
return $this->linkAsset($url, $title, $attributes, true);
213+
return $this->linkAsset($url, $title, $attributes, true, $escape);
211214
}
212215

213216
/**
@@ -217,12 +220,14 @@ public function linkSecureAsset($url, $title = null, $attributes = [])
217220
* @param string $title
218221
* @param array $parameters
219222
* @param array $attributes
223+
* @param bool $secure
224+
* @param bool $escape
220225
*
221226
* @return \Illuminate\Support\HtmlString
222227
*/
223-
public function linkRoute($name, $title = null, $parameters = [], $attributes = [])
228+
public function linkRoute($name, $title = null, $parameters = [], $attributes = [], $secure = null, $escape = true)
224229
{
225-
return $this->link($this->url->route($name, $parameters), $title, $attributes);
230+
return $this->link($this->url->route($name, $parameters), $title, $attributes, $secure, $escape);
226231
}
227232

228233
/**
@@ -232,12 +237,14 @@ public function linkRoute($name, $title = null, $parameters = [], $attributes =
232237
* @param string $title
233238
* @param array $parameters
234239
* @param array $attributes
240+
* @param bool $secure
241+
* @param bool $escape
235242
*
236243
* @return \Illuminate\Support\HtmlString
237244
*/
238-
public function linkAction($action, $title = null, $parameters = [], $attributes = [])
245+
public function linkAction($action, $title = null, $parameters = [], $attributes = [], $secure = null, $escape = true)
239246
{
240-
return $this->link($this->url->action($action, $parameters), $title, $attributes);
247+
return $this->link($this->url->action($action, $parameters), $title, $attributes, $secure, $escape);
241248
}
242249

243250
/**

0 commit comments

Comments
 (0)