Skip to content

Commit f799f61

Browse files
committed
Add xss rawColumns api.
1 parent 5ec693f commit f799f61

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

xss.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# XSS filtering
22

3-
To prevent XSS attack on some of your columns, you can use `escapeColumns` api.
3+
Since v7.0, all dataTable response are encoded to prevent XSS attack. In case you need to display html on your columns, you can use `rawColumns` api.
4+
5+
> `action` column is allowed as raw by default.
6+
7+
<a name="raw"></a>
8+
9+
## Raw Columns
10+
```php
11+
return Datatables::eloquent(Role::select())
12+
->rawColumns(['name', 'action'])
13+
->make(true);
14+
```
15+
16+
# Other XSS methods
417

518
<a name="selected"></a>
619
## Escape selected fields

0 commit comments

Comments
 (0)