Escape request and database values in forms and links.
Add form_value() in html.lib.php.
This commit is contained in:
+1
-5
@@ -1,11 +1,7 @@
|
||||
<?php
|
||||
require_once('open_db.lib.php');
|
||||
require_once(__DIR__ . '/lib/purify.inc.php');
|
||||
|
||||
// Escape plain text for HTML (existing entities such as … are kept)
|
||||
function h($string) {
|
||||
return htmlspecialchars((string)$string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', FALSE);
|
||||
}
|
||||
require_once(__DIR__ . '/html.lib.php');
|
||||
|
||||
function display_stories($id = NULL) {
|
||||
global $db, $is_admin, $editable, $action;
|
||||
|
||||
Reference in New Issue
Block a user