diff --git a/api/RSSFeed.php b/api/RSSFeed.php index acc81fb02..6c6c569ce 100644 --- a/api/RSSFeed.php +++ b/api/RSSFeed.php @@ -16,6 +16,7 @@ class RSSFeed extends ViewableData { private static $casting = array( "Title" => "Varchar", "Description" => "Varchar", + "Link" => "Varchar", ); /** diff --git a/tests/api/RSSFeedTest.php b/tests/api/RSSFeedTest.php index 0402bd30a..9bbf25927 100644 --- a/tests/api/RSSFeedTest.php +++ b/tests/api/RSSFeedTest.php @@ -43,6 +43,13 @@ class RSSFeedTest extends SapphireTest { $this->assertContains('ItemC AltContent', $content); } + public function testLinkEncoding() { + $list = new ArrayList(); + $rssFeed = new RSSFeed($list, "http://www.example.com/?param1=true¶m2=true", "Test RSS Feed"); + $content = $rssFeed->outputToBrowser(); + $this->assertContains('http://www.example.com/?param1=true&param2=true', $content); + } + public function testRSSFeedWithShortcode() { $list = new ArrayList(); $list->push(new RSSFeedTest_ItemD());