Modified: special character ' issue fixed in comments admin area also in front end

This commit is contained in:
Awais-cb 2017-06-08 15:58:49 +05:00
parent 2b6a76ffae
commit 44e8f06444
3 changed files with 21 additions and 1 deletions

View file

@ -794,6 +794,8 @@ if(!empty($mode))
$parent_id = $new_com['parent_id'];
assign('type_id',$type_id);
$new_com['comment']=html_entity_decode(stripslashes($new_com['comment']));
if ($parent_id)
{

View file

@ -785,7 +785,12 @@ class myquery {
$query .= " LIMIT $limit";
$results = db_select($query);
foreach ($results as $key=>$val)
{
$results[$key]['comment'] = html_entity_decode(stripslashes($results[$key]['comment']));
}
if(!$results)
return false;
@ -799,6 +804,12 @@ class myquery {
$query = "SELECT * FROM ".tbl('comments');
$query .= " WHERE type='$type' $typeid_query AND parent_id='".$result['comment_id']."' ";
$replies = db_select($query);
foreach ($replies as $key=>$val)
{
$replies[$key]['comment'] = html_entity_decode(stripslashes($replies[$key]['comment']));
}
if ($replies )
{
$replies = array("comments"=>$replies);

View file

@ -638,7 +638,14 @@
}
// pr($result,true);
if($result) {
foreach ($result as $key=>$val)
{
$result[$key]['comment'] = html_entity_decode(stripslashes($result[$key]['comment']));
}
return $result;
} else {
return false;
}