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

Blog contents are processed by format_text() twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.9, 1.9.5
    • 1.8.8, 1.9.4
    • Blog
    • None
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      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

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Helen Foster Helen Foster
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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