In moodlelib.php, the comment for PARAM_TEXT states:
/**
|
* PARAM_TEXT - general plain text compatible with multilang filter, no other html tags. Please note '<', or '>' are allowed here.
|
*/
|
define('PARAM_TEXT', 'text');
|
When calling 'clean_param' with text containing a less than character then no text is returned. To reproduce, with the code:
echo '<h3>clean_param(\'<\',PARAM_TEXT): '.clean_param('<',PARAM_TEXT).'</h3>';
|
echo '<h3>clean_param(\'>\',PARAM_TEXT): '.clean_param('>',PARAM_TEXT).'</h3>';
|
echo '<h3>clean_param(\'<\',PARAM_RAW) : '.clean_param('<',PARAM_RAW).'</h3>';
|
echo '<h3>clean_param(\'>\',PARAM_RAW) : '.clean_param('>',PARAM_RAW).'</h3>';
|
the output is:
clean_param('<',PARAM_TEXT):
|
clean_param('>',PARAM_TEXT): >
|
clean_param('<',PARAM_RAW) : <
|
clean_param('>',PARAM_RAW) : >
|
when it should be:
clean_param('<',PARAM_TEXT): <
|
clean_param('>',PARAM_TEXT): >
|
clean_param('<',PARAM_RAW) : <
|
clean_param('>',PARAM_RAW) : >
|
- Discovered while testing
-
CONTRIB-5211 Section 5 does not remain expanded when browsing away and back
-
- Resolved
-
- duplicates
-
MDL-49071 Question type Match , does not work with "<" as a answer
-
- Closed
-
- has a non-specific relationship to
-
MDL-72058 Remove HTML tags when exporting to Dataformats that don't support it
-
- Closed
-
- has been marked as being related by
-
MDL-76132 Quick Grading truncates after special characters
-
- Open
-
-
MDL-77088 Forum-text is truncated after lower-than-letter, if there is no following space
-
- Open
-
-
MDL-77422 E-mails containing a "<" are truncated from this character on.
-
- Open
-
-
MDL-29370 Cannot create a forum post with subject "x <> X"
-
- Closed
-
-
MDL-85024 Text custom field doesn't display error message to user when HTML entered.
-
- Open
-
- is duplicated by
-
MDL-49077 clean_param($x, PARAM_TEXT) does not work the way users expect regarding < characters
-
- Closed
-
-
MDL-74950 Text is truncated when saved if a < is immediatly followed by (an)other character(s), and not by a space
-
- Closed
-
-
MDL-80419 Feedback : "<-" tags and other text overkill deletions
-
- Closed
-
- will help resolve
-
MDL-77689 wrong character encoding in group overview
-
- Closed
-
-
MDL-81099 Quiz responses exported > missing text when using less than / HTML delimiter ("<xxx")
-
- Closed
-