1. Go to this page and download the library: Download masterro/laravel-xss-filter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
masterro / laravel-xss-filter example snippets
<html>
<head>
<script src="app.js"></script>
<script>window.init()</script>
<meta name="test" />
<script>
let Iframe = new Iframe('#iframe');
</script>
<head>
<body>
<div class="hover" onhover="show()" data-a="b"><p onclick="click"><span class="span" ondblclick="hide()"></span>Aawfawfaw f awf aw </p></div>
<iframe id="iframe">Not supported!</iframe>
</body>
</html>
<html>
<head>
<script src="app.js"></script>
<script>window.init()</script>
<meta name="test" />
<script>
let Iframe = new Iframe('#iframe');
</script>
<head>
<body>
<div class="hover" data-a="b"><p ><span class="span" ></span>Aawfawfaw f awf aw </p></div>
<iframe id="iframe">Not supported!</iframe>
</body>
</html>
// AppServiceProvider.php
public function boot(): void
{
Livewire::setUpdateRoute(static function ($handle) {
return Route::post('/livewire/update', $handle)
->middleware(['web', FilterXSSLivewire::class]);
});
}
// AppServiceProvider.php
public function boot(): void
{
Livewire::addPersistentMiddleware([
FilterXSSLivewire::class,
]);
}