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