mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-09 00:42:34 -04:00
net/haproxy: decode HTML entities when exporting data
This commit is contained in:
parent
34edf62f22
commit
2050ac7cb9
2 changed files with 2 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ if (isset($configObj->OPNsense->HAProxy->errorfiles)) {
|
|||
$ef_name = (string)$errorfile->name;
|
||||
$ef_id = (string)$errorfile->id;
|
||||
if ($ef_id != "") {
|
||||
$ef_content = str_replace("\n\n", "\n", str_replace("\r", "", (string)$errorfile->content));
|
||||
$ef_content = htmlspecialchars_decode(str_replace("\r", "", (string)$errorfile->content));
|
||||
$ef_filename = "/var/etc/haproxy/errorfiles/" . $ef_id . ".txt" ;
|
||||
file_put_contents($ef_filename, $ef_content);
|
||||
chmod($ef_filename, 0600);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ if (isset($configObj->OPNsense->HAProxy->luas)) {
|
|||
$lua_name = (string)$lua->name;
|
||||
$lua_id = (string)$lua->id;
|
||||
if ($lua_id != "") {
|
||||
$lua_content = str_replace("\n\n", "\n", str_replace("\r", "", (string)$lua->content));
|
||||
$lua_content = htmlspecialchars_decode(str_replace("\r", "", (string)$lua->content));
|
||||
$lua_filename = "/var/etc/haproxy/lua/" . $lua_id . ".lua" ;
|
||||
file_put_contents($lua_filename, $lua_content);
|
||||
chmod($lua_filename, 0600);
|
||||
|
|
|
|||
Loading…
Reference in a new issue