We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6befea commit 3a472d5Copy full SHA for 3a472d5
src/Liquid/StandardFilters.php
@@ -201,6 +201,10 @@ public static function escape($input)
201
return $input;
202
}
203
204
+ if (is_null($input)) {
205
+ return '';
206
+ }
207
+
208
return htmlentities($input, ENT_QUOTES);
209
210
tests/Liquid/StandardFiltersTest.php
@@ -231,6 +231,7 @@ public function testEscape()
231
$data = array(
232
"one Word's not" => "one Word's not",
233
"&><\"'" => "&><"'",
234
+ null => '',
235
);
236
237
foreach ($data as $element => $expected) {
0 commit comments