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

Blog contents are processed by format_text() twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.8, 1.9.4
    • Fix Version/s: 1.8.9, 1.9.5
    • Component/s: Blog
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      While testing http://moodle.org/mod/forum/discuss.php?d=114466

      I've detected that something in blogs is causing wrong output of contents. After some reseach, it seems that the blog_print_entry() function performs a format_text() with contents twice:

      $template['body'] = format_text($blogEntry->summary, $blogEntry->format);
      ...
      ...
      echo format_text($template['body']);

      with the second call, breaking the output generated by the first, noticeable <object> tags and so on from filters.

      So I'm going to erase the second call, outputting directly $template['body'] that has been already processed.

      For QA: After being applied, filters generated content (multimedia, multimovie...), should be present in output. Now it isn't.

      Ciao

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Helen Foster
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/09