From 77fb01833e00adf330abd53f715a45df501dbcf0 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 9 Dec 2010 03:02:26 +0000 Subject: [PATCH] rss MDL-25563 made the rss block unescape item URLs to prevent double escaping --- blocks/rss_client/block_rss_client.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index 01b06de41d9..21eb44f2f10 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -238,6 +238,11 @@ if(empty($link)){ $link = $item->get_id(); + } else { + //URLs in our RSS cache will be escaped (correctly as theyre store in XML) + //html_writer::link() will re-escape them. To prevent double escaping unescape here. + //This can by done using htmlspecialchars_decode() but moodle_url also has that effect + $link = new moodle_url($link); } $r = html_writer::start_tag('li'); -- 2.43.0