Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1102

Notifications - GUI shows html tags (bullet list)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.3.4, 10.0
    • Fix Version/s: 9.4.2
    • Component/s: Course, Framework
    • Labels:
      None

      Description

      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.

        Attachments

        1. OLAT675.jpg
          OLAT675.jpg
          75 kB
        2. OLAT676.jpg
          OLAT676.jpg
          28 kB

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            eva_uibk Eva Pfister
            Tester:
            Kirsten Scherer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes Time Not Required
                35m