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

Moodle auto-format removes spaces between inline HTML-tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.1 regressions, 4.1.14
    • Filters, Libraries
    • MOODLE_401_STABLE

      When converting text likeĀ 

      Some text <strong>Hello</strong> <em>World</em>!

      from Moodle auto-format to HTML, whitespaces between HTML tags are removed, even if the tags are not block-level elements.

      Observed behavior
      The text is converted to

      <div class="text_to_html">Some text <strong>Hello</strong><em>World</em>!</div>

      Expected behavior
      The text should be converted to

      <div class="text_to_html">Some text <strong>Hello</strong> <em>World</em>!</div>

      Further information
      The issue is caused by the following code in the function text_to_html in the file lib/weblib.php (see GitHub). Introducing commit: https://github.com/moodle/moodle/commit/729be1ab37a2eb35cbda4a3ca8be2bf70bdfd3c1

            Unassigned Unassigned
            yorik Yorik Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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