htmlentities -> htmlspecialchars

This commit is contained in:
2024-12-06 15:35:38 +08:00
parent daa005f029
commit d9b2d13caa
184 changed files with 410 additions and 405 deletions

View File

@@ -66,7 +66,7 @@ if(isset($_POST['news_id'])){
$row = $result[0];
$title = htmlentities($row['title'],ENT_QUOTES,"UTF-8");
$title = htmlspecialchars($row['title'],ENT_QUOTES,"UTF-8");
$content = $row['content'];
}
?>
@@ -109,7 +109,7 @@ if(isset($_POST['news_id'])){
<?php require_once("../include/set_post_key.php");?>
<label for=title>标题</label><input type="text" name="title" class="form-control" value="<?php echo $title;?>">
<lable for=content>内容</lable>
<textarea name='content' rows=15 class="kindeditor" ><?php echo htmlentities($content,ENT_QUOTES,"UTF-8")?></textarea><br>
<textarea name='content' rows=15 class="kindeditor" ><?php echo htmlspecialchars($content,ENT_QUOTES,"UTF-8")?></textarea><br>
<input type=hidden name='news_id' value=<?php echo $news_id?>>
<button type='submit' class="btn btn-info btn-addon i"><i class="fa fa-save"></i>保存</button>
</form>