htmlentities -> htmlspecialchars
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user