-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 9.3.4, 10.0
-
Fix Version/s: 9.4.2
-
Labels:None
-
Funded by:
How to reproduce
- Create an info course element
- Create info message
- Type one - enter - two - enter - three (NO enter)
- Mark the words one two three and check the list formatting in the editor
- The words now display in list form
- Save the info message and close wizard
=> Message appears as escaped HTML
The same does not happen when after three an enter is added. This will add a p tag to the editor.
The problem is that the method to detect HTML only checks for some HTML element. The method is called in InfoDisplayController.createInfoMessageForDisplay().
From StringHelper class:
public static boolean isHtml(String s) { if (s == null) return false; return s.contains("<html") || s.contains("<body") || s.contains("<p") || s.contains("<span"); }
The method should be more robust and detect more HTML elements or maybe rewritten to return true when the first non-white character is a "<" character.