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 ce8c3a1 commit c632cbaCopy full SHA for c632cba
src/Cleaner.php
@@ -60,6 +60,6 @@ protected function removeInlineEventListeners(string $value): string
60
{
61
$string = preg_replace($this->inlineListenersPattern, '', $value);
62
63
- return empty($string) ? '' : $string;
+ return !is_string($string) ? '' : $string;
64
}
65
tests/FilterXSSTest.php
@@ -157,4 +157,13 @@ public function it_clears_nested_inputs()
157
], $this->request->all());
158
159
160
+ /**
161
+ * @test
162
+ */
163
+ public function it_dont_convert_0_to_empty_string() {
164
+ $this->responseFromMiddlewareWithInput($input = ['text' => '0']);
165
+
166
+ $this->assertEquals($input, $this->request->all());
167
+ }
168
169
0 commit comments