From b33a215c38cf8056738eef82f92b157f6e299c12 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 16 Sep 2014 12:02:31 +0100 Subject: [PATCH] Issue #2251111 by jibran | dawehner: Remove format_rss_item() and format_rss_channel(). --- core/includes/common.inc | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index 6c32ad42d31..3d245a0bff3 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -403,46 +403,6 @@ function check_url($uri) { * Functions to format numbers, strings, dates, etc. */ -/** - * Formats an RSS channel. - * - * Arbitrary elements may be added using the $args associative array. - */ -function format_rss_channel($title, $link, $description, $items, $langcode = NULL, $args = array()) { - $langcode = $langcode ? $langcode : \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id; - - $output = "\n"; - $output .= ' ' . String::checkPlain($title) . "\n"; - $output .= ' ' . check_url($link) . "\n"; - - // The RSS 2.0 "spec" doesn't indicate HTML can be used in the description. - // We strip all HTML tags, but need to prevent double encoding from properly - // escaped source data (such as & becoming &). - $output .= ' ' . String::checkPlain(decode_entities(strip_tags($description))) . "\n"; - $output .= ' ' . String::checkPlain($langcode) . "\n"; - $output .= format_xml_elements($args); - $output .= $items; - $output .= "\n"; - - return $output; -} - -/** - * Formats a single RSS item. - * - * Arbitrary elements may be added using the $args associative array. - */ -function format_rss_item($title, $link, $description, $args = array()) { - $output = "\n"; - $output .= ' ' . String::checkPlain($title) . "\n"; - $output .= ' ' . check_url($link) . "\n"; - $output .= ' ' . String::checkPlain($description) . "\n"; - $output .= format_xml_elements($args); - $output .= "\n"; - - return $output; -} - /** * Formats XML elements. *