-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.11.7, 4.0.1
-
None
-
MOODLE_311_STABLE, MOODLE_400_STABLE
Hi,
First discovered a problem specified in MDL-74947, i now realise it's something (more) general : when in a text field, if you insert a < character followed by (an)other character(s), and not by a space, when saving the value (the whole form), it's truncated at the < place.
If you use :
- "rtyu < 99" => "rtyu < 99"
- "rtyu< 99" => "rtyu< 99"
- "rtyu <99" => "rtyu "
- "rtyu<99" => "rtyu"
In short, the text is truncated when a < character is immediatly followed by another character, and not by a space!
It's the case in lot of places. In fact, it seems related to the fact that the field is in PARAM_TEXT (and not in PARAM_RAW). I suspect this type of field is made (and cleaned) to avoid insertion of bad code in the database.
Could this be improved to clean text while allowing to insert such < character?
I think MDL-46754 is somehow related.
Séverin