diff --git a/README.md b/README.md index 153247f..286f96c 100644 --- a/README.md +++ b/README.md @@ -16,51 +16,94 @@ composer require rancoud/security ## How to use it? ```php -Security::escAttr('string'); +use Rancoud\Security\Security; -Security::escHTML('string'); +// When you want to escape text for HTML output. +echo '

' . Security::escHTML('') . '

' . "\n"; +// ->

<script>alert("test");</script>

-Security::escJS('string'); +// When you want to escape text for HTML attribute output. +echo '