Details
Description
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) : >
|
Attachments
Issue Links
- caused a regression
-
CONTRIB-5211 Section 5 does not remain expanded when browsing away and back
-
- Resolved
-
- 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 been marked as being related by
-
MDL-29370 Cannot create a forum post with subject "x <> X"
-
- Open
-
- is duplicated by
-
MDL-49077 clean_param($x, PARAM_TEXT) does not work the way users expect regarding < characters
-
- Closed
-