mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge branch 'devel' into tweak/replace_domains
This commit is contained in:
@@ -17,6 +17,8 @@ function escapeHtml(text) {
|
||||
"'": "'"
|
||||
};
|
||||
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replace(/[&<>"']/g, function (m) {
|
||||
return map[m];
|
||||
});
|
||||
@@ -31,6 +33,8 @@ function unescapeHtml(text) {
|
||||
"'": "'"
|
||||
};
|
||||
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replace(/&(?:amp|lt|gt|quot|#039);/g, function (m) {
|
||||
return map[m];
|
||||
});
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ $piholeFTLConf = piholeFTLConfig();
|
||||
|
||||
// Handling of PHP internal errors
|
||||
$last_error = error_get_last();
|
||||
if($last_error["type"] === E_WARNING || $last_error["type"] === E_ERROR)
|
||||
if(isset($last_error) && ($last_error["type"] === E_WARNING || $last_error["type"] === E_ERROR))
|
||||
{
|
||||
$error .= "There was a problem applying your settings.<br>Debugging information:<br>PHP error (".htmlspecialchars($last_error["type"])."): ".htmlspecialchars($last_error["message"])." in ".htmlspecialchars($last_error["file"]).":".htmlspecialchars($last_error["line"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user