diff --git a/application/models/Answer_model.php b/application/models/Answer_model.php index 8cf7fb16618c201a26476ee2f05cc214b4432a3d..6b3f24223bf031a9163b9d6371ef500ec983c9f7 100644 --- a/application/models/Answer_model.php +++ b/application/models/Answer_model.php @@ -23,7 +23,7 @@ class Answer_model extends CI_Model { $answer ['format_time'] = tdate ( $answer ['time'] ); $answer ['appends'] = $this->get_appends ( $answer ['id'] ); $answer ['title'] = checkwordsglobal ( $answer ['title'] ); - $answer ['content'] = checkwordsglobal (htmlspecialchars_decode( $answer ['content'] )); + $answer ['content'] = checkwordsglobal ( $answer ['content'] ); } return $answer; } @@ -59,7 +59,7 @@ class Answer_model extends CI_Model { $bestanswer ['total'] = 0; } $bestanswer ['title'] = checkwordsglobal ( $bestanswer ['title'] ); - $bestanswer ['content'] = checkwordsglobal (htmlspecialchars_decode( $bestanswer ['content'] )); + $bestanswer ['content'] = checkwordsglobal ( $bestanswer ['content'] ); $bestanswer ['userinfo'] = array (); $query = $this->db->get_where ( 'user', array ('uid' => $bestanswer ['authorid'] ) ); @@ -120,7 +120,7 @@ class Answer_model extends CI_Model { } $answer ['time'] = tdate ( $answer ['time'] ); $answer ['ip'] = formatip ( $answer ['ip'] ); - $answer ['content'] = checkwordsglobal (htmlspecialchars_decode( $answer ['content'])); + $answer ['content'] = checkwordsglobal ( $answer ['content']); $answer ['title'] = checkwordsglobal ( $answer ['title'] ); $answer ['author_has_vertify'] = get_vertify_info ( $answer ['authorid'] ); //用户是否认证 $answer ['author_avartar'] = get_avatar_dir ( $answer ['authorid'] ); diff --git a/application/models/Question_model.php b/application/models/Question_model.php index dac1c3702ba66a2cb9faa909794343dae464385d..48f8deeccd6d4c8ca2e109737d55fbe0f5ddf8ea 100644 --- a/application/models/Question_model.php +++ b/application/models/Question_model.php @@ -120,7 +120,7 @@ class Question_model extends CI_Model { $question['shortdescription']="[图]".$question ['shortdescription']; } $question ['artlen']=mb_strlen(strip_tags(checkwordsglobal ( htmlspecialchars_decode($question ['description'] ) ))); - $question ['description'] = checkwordsglobal (htmlspecialchars_decode($question ['description'] ) ); + $question ['description'] = checkwordsglobal ($question ['description'] ); } return $question; } diff --git a/application/views/default/editor.php b/application/views/default/editor.php index 5c8a3504a65633de19cca5ea82f44b299491ccb7..c9e8e723aa58050735dcb38e0e6e6189ed47226c 100644 --- a/application/views/default/editor.php +++ b/application/views/default/editor.php @@ -18,7 +18,7 @@ {if $this->uri->segment ( 1 )!='question'} {eval echo replacewords($topic['describtion']);} {/if} - {if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'} {eval echo htmlspecialchars_decode($answer['content']);} {/if} + {if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'} {eval echo $answer['content'];} {/if} {/if} diff --git a/application/views/default/solve.php b/application/views/default/solve.php index 04acefda7df0199a023711da1b9692f414ef061d..67bb83ba9df92d0666bbec574a33b6d8e227cb4b 100644 --- a/application/views/default/solve.php +++ b/application/views/default/solve.php @@ -354,16 +354,16 @@ position:relative;
{if $question['artlen']>=100||strstr($question['shortdescription'],'图')} - {eval echo htmlspecialchars_decode( htmlspecialchars_decode($question['shortdescription']));} + {eval echo $question['shortdescription'];} {else} - {eval echo htmlspecialchars_decode( htmlspecialchars_decode(replacewords($question['description']))); } + {eval echo replacewords($question['description']); } {/if}
@@ -514,7 +514,7 @@ position:relative; {/if}
作者追问:{$append['format_time']}