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

Wiki-Page: page layout broken if html contains line breaks

XMLWordPrintable

      Problem:
      If the html- code of a wiki page contains line breaks, these are not shown in the preview (expected behaviour). But when viewing the page after it is saved, unexpected line breaks occur in the view.
      To reproduce the problem (tested on demo.moodle.org):
      1. Create a new wiki page in html format
      2. Make sure you use atto as editor (not TinyMCE)
      3. Open the html view of the editor and insert text a text and hit [ENTER] to insert new lines (do not insert <br/>).
      4. Leave the html view. As expected, the WYSIWYG editor now shows a single line of text.
      5. Hit the preview button.
      6. The wiki preview shows a single line of text.
      7. Save and view the wiki page: It contains line break whenever you inserted a new line within the html-editor.
      This problem does not occur with TinyMCE as it removes new lines from the html code.

      Quickfix:
      Within Mod/wiki/locallib.php: wiki_print_page_content change FORMAT_MOODLE to FORMAT_HTML when calling method format_text

      The general problem: the Wiki format does not use a single method for rendering a page. E.G see mod/wiki/pagelib.php:[class]page_wiki_preview:print_preview() has a different behaviour when previewing a page.

            dmaterka Daniel Materka
            super3d Claus A. Us.
            Marcus Green Marcus Green
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            John Okely John Okely
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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