Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman authored Jan 21, 2022
1 parent 1554e50 commit e562890
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $app->register(Stevebauman\Purify\PurifyServiceProvider::class);
To clean a users input, simply use the clean method:

```php
$input = '<script>alert("Harmful Script");</script> <p style="a style" class="text-gray-700">Test</p>';
$input = '<script>alert("Harmful Script");</script> <p style="border:1px solid black" class="text-gray-700">Test</p>';

// Returns '<p class="text-gray-700">Test</p>'
$cleaned = Purify::clean($input);
Expand All @@ -52,8 +52,8 @@ Need to purify an array of user input? Just pass in an array:

```php
$array = [
'<script>alert("Harmful Script");</script> <p style="a style" class="text-gray-700">Test</p>',
'<script>alert("Harmful Script");</script> <p style="a style" class="text-gray-700">Test</p>',
'<script>alert("Harmful Script");</script> <p style="border:1px solid black" class="text-gray-700">Test</p>',
'<script>alert("Harmful Script");</script> <p style="border:1px solid black" class="text-gray-700">Test</p>',
];

$cleaned = Purify::clean($array);
Expand Down

0 comments on commit e562890

Please sign in to comment.