mirror of
https://github.com/unraid/webgui.git
synced 2026-05-06 20:30:50 -05:00
Script protection
This commit is contained in:
@@ -19,6 +19,9 @@ require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
|
||||
|
||||
function unscript($text) {
|
||||
return preg_replace('#<script(.*?)>(.+?)</script>#','',html_entity_decode($text));
|
||||
}
|
||||
function safe($text) {
|
||||
return preg_replace('/[!@#$%^&\*\(\)\[\]{}"\|\?<>\/;]+/','',unscript(html_entity_decode($text)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user