diff --git a/blocks/blog_recent/block_blog_recent.php b/blocks/blog_recent/block_blog_recent.php
index b0d875b789d..7089194f8be 100644
--- a/blocks/blog_recent/block_blog_recent.php
+++ b/blocks/blog_recent/block_blog_recent.php
@@ -114,7 +114,8 @@ class block_blog_recent extends block_base {
foreach ($entries as $entryid => $entry) {
$viewblogurl->param('entryid', $entryid);
- $entrylink = html_writer::link($viewblogurl, shorten_text($entry->subject));
+ $entrylink = html_writer::link($viewblogurl, shorten_text(format_string($entry->subject, true,
+ ['context' => $context])));
$entrieslist[] = $entrylink;
}
diff --git a/blocks/blog_recent/tests/behat/block_blog_recent_course.feature b/blocks/blog_recent/tests/behat/block_blog_recent_course.feature
index 8814cc47693..923d077463b 100644
--- a/blocks/blog_recent/tests/behat/block_blog_recent_course.feature
+++ b/blocks/blog_recent/tests/behat/block_blog_recent_course.feature
@@ -16,6 +16,8 @@ Feature: Students can use the recent blog entries block to view recent entries o
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
+ And the "multilang" filter is "on"
+ And the "multilang" filter applies to "content and headings"
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Blog menu" block
@@ -27,13 +29,13 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I am on "Course 1" course homepage
And I follow "Add an entry about this course"
When I set the following fields to these values:
- | Entry title | S1 First Blog |
+ | Entry title | S1 First Blog RUSSIANENGLISH |
| Blog entry body | This is my awesome blog! |
And I press "Save changes"
- Then I should see "S1 First Blog"
+ Then I should see "S1 First Blog ENGLISH"
And I should see "This is my awesome blog!"
And I am on "Course 1" course homepage
- And I should see "S1 First Blog"
+ And I should see "S1 First Blog ENGLISH"
And I follow "S1 First Blog"
And I should see "This is my awesome blog!"