Issue Details (XML | Word | Printable)

Key: MDL-18129
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Blog contents are processed by format_text() twice

Created: 04/Feb/09 02:20 AM   Updated: 05/Feb/09 01:43 AM
Return to search
Component/s: Blog
Affects Version/s: 1.8.8, 1.9.4
Fix Version/s: 1.8.9, 1.9.5

Participants: Eloy Lafuente (stronk7)
Security Level: None
QA Assignee: Helen Foster
Resolved date: 05/Feb/09
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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 :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 05/Feb/09 01:39 AM
MDL-18129 blog_print_entry() - avoid double format_text()
MODIFY blog/lib.php   Rev. 1.80.2.17    (+2 -2 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' - 05/Feb/09 01:40 AM
MDL-18129 blog_print_entry() - avoid double format_text() ; merged from 19_STABLE
MODIFY blog/lib.php   Rev. 1.104    (+2 -2 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 05/Feb/09 01:42 AM
MDL-18129 blog_print_entry() - avoid double format_text() ; backported from HEAD
MODIFY blog/lib.php   Rev. 1.62.2.9    (+3 -3 lines)