| @@ -13,8 +13,9 @@ | ||
| 13 | 13 | |
| 14 | 14 | use Exception; |
| 15 | 15 | use LearnPress\Databases\QuestionAnswersDB; |
| 16 | 16 | use LearnPress\Filters\QuestionAnswersFilter; |
| 17 | +use LearnPress\Helpers\Template; | |
| 17 | 18 | use LearnPress\Models\PostModel; |
| 18 | 19 | use LP_Cache; |
| 19 | 20 | use LP_Debug; |
| 20 | 21 | use LP_Question_Filter; |
| @@ -197,9 +198,11 @@ | ||
| 197 | 198 | /** |
| 198 | 199 | * @return mixed |
| 199 | 200 | */ |
| 200 | 201 | public function get_hint() { |
| 201 | - return $this->get_meta_value_by_key( self::META_KEY_HINT, '' ); | |
| 202 | + return Template::sanitize_html_content( | |
| 203 | + (string) $this->get_meta_value_by_key( self::META_KEY_HINT, '' ) | |
| 204 | + ); | |
| 202 | 205 | } |
| 203 | 206 | |
| 204 | 207 | /** |
| 205 | 208 | * @return mixed |
| @@ -204,9 +207,11 @@ | ||
| 204 | 207 | /** |
| 205 | 208 | * @return mixed |
| 206 | 209 | */ |
| 207 | 210 | public function get_explanation() { |
| 208 | - return $this->get_meta_value_by_key( self::META_KEY_EXPLANATION, '' ); | |
| 211 | + return Template::sanitize_html_content( | |
| 212 | + (string) $this->get_meta_value_by_key( self::META_KEY_EXPLANATION, '' ) | |
| 213 | + ); | |
| 209 | 214 | } |
| 210 | 215 | |
| 211 | 216 | /** |
| 212 | 217 | * @return mixed |
| @@ -211,9 +216,9 @@ | ||
| 211 | 216 | /** |
| 212 | 217 | * @return mixed |
| 213 | 218 | */ |
| 214 | 219 | public function get_mark() { |
| 215 | - return $this->get_meta_value_by_key( self::META_KEY_MARK, 1 ); | |
| 220 | + return (float) $this->get_meta_value_by_key( self::META_KEY_MARK, 1 ); | |
| 216 | 221 | } |
| 217 | 222 | |
| 218 | 223 | /** |
| 219 | 224 | * Create default answers for question |