File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -263,28 +263,28 @@ protected function batch($var, $functions)
263
263
264
264
/**
265
265
* Escape string.
266
- * @param string $string
266
+ * @param string $string
267
+ * @param null|string $functions
267
268
* @return string
268
269
*/
269
- protected function escape ($ string )
270
+ protected function escape ($ string, $ functions = null )
270
271
{
271
- $ functions = array_slice (func_get_args (), 1 );
272
-
273
272
if ($ functions ) {
274
- $ string = $ this ->batch ($ string , implode ( ' | ' , $ functions) );
273
+ $ string = $ this ->batch ($ string , $ functions );
275
274
}
276
275
277
276
return htmlspecialchars ($ string , ENT_QUOTES | ENT_SUBSTITUTE , 'UTF-8 ' );
278
277
}
279
278
280
279
/**
281
280
* Alias to escape function.
282
- * @param string $string
281
+ * @param string $string
282
+ * @param null|string $functions
283
283
* @return string
284
284
*/
285
- protected function e ($ string )
285
+ protected function e ($ string, $ functions = null )
286
286
{
287
- return call_user_func_array ( array ( $ this , ' escape ' ), func_get_args () );
287
+ return $ this -> escape ( $ string , $ functions );
288
288
}
289
289
}
290
290
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function testEscapeFunctionBatch()
229
229
{
230
230
vfsStream::create (
231
231
array (
232
- 'template.php ' => '<?php echo $this->escape("<strong>Jonathan</strong>", "strtoupper", " strrev") ?> '
232
+ 'template.php ' => '<?php echo $this->escape("<strong>Jonathan</strong>", "strtoupper| strrev") ?> '
233
233
)
234
234
);
235
235
You can’t perform that action at this time.
0 commit comments