mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
[ss-2015-022]: XML escape RSSFeed $link parameter
This commit is contained in:
parent
97f21fddb3
commit
ac4342d81d
@ -16,6 +16,7 @@ class RSSFeed extends ViewableData {
|
||||
private static $casting = array(
|
||||
"Title" => "Varchar",
|
||||
"Description" => "Varchar",
|
||||
"Link" => "Varchar",
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,13 @@ class RSSFeedTest extends SapphireTest {
|
||||
$this->assertContains('<description>ItemC AltContent</description>', $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('<link>http://www.example.com/?param1=true&param2=true', $content);
|
||||
}
|
||||
|
||||
public function testRSSFeedWithShortcode() {
|
||||
$list = new ArrayList();
|
||||
$list->push(new RSSFeedTest_ItemD());
|
||||
|
Loading…
Reference in New Issue
Block a user