PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 All 142 releases
← All changes | inc/Models/Question/QuestionPostModel.php +8 -3 4.4.6 → 4.4.10 View file →
@@ -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