diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc index ec3f5a7..424e529 100644 --- a/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -477,14 +477,8 @@ function template_preprocess_aggregator_page_rss(&$variables) { $variables['description'] = check_plain(decode_entities(strip_tags($description))); $variables['items'] = $items; - /** - * Use RSS language code if found, otherwise default to existing page language code - */ - if (isset($category['langcode'])) - $variables['langcode'] = check_plain($category['langcode']); - // Try to default to the site language code - elseif (!isset($variables['langcode'])) - $variables['langcode'] = language(Language::TYPE_CONTENT)->langcode; + $langcode = (isset($category['langcode']) ? $category['langcode'] : language(Language::TYPE_CONTENT)->langcode); + $variables['langcode'] = check_plain($langcode); // Pass along any channel args to be rendered after the language code. if (isset($category['args']) && is_array($category['args'])) {