Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20537

shorten_text sometimes omits close tags

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.9.7
    • 1.9.5
    • Libraries
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      The core function shorten_text is supposed to close any HTML tags that it cuts off. However this only occurs sometimes, depending on the parameters. The sequence of events that occurs is:

      • Function divides input into blocks starting with each tag (open/close/empty)
      • Loops through these input 'lines' until there is more text than the shorten_text allows

      At this point, any tags that are not closed (ie that would be closed in future 'lines') are safe - they will be closed.

      • Goes back looking for a space or suitable breakpoint to chop the text so it is under the limit

      During this process close tags may be chopped off. These are not re-added.

      Attachments

        Issue Links

          Activity

            People

              quen Sam Marshall
              quen Sam Marshall
              Andrew Davis Andrew Davis
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.