Permalink
Browse files

API CHANGE Deprecated Text->EscapeXML(), use DBField->XML() instead

  • Loading branch information...
1 parent 618d767 commit 6ecf7ffe84a2eb8141be135a5d23c5a433f8c9a2 @chillu chillu committed Jan 31, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 model/fieldtypes/Text.php
  2. +1 −1 templates/RSSFeed.ss
View
3 model/fieldtypes/Text.php
@@ -75,9 +75,12 @@ function NoHTML() {
}
/**
* Return the value of the field with XML tags escaped.
+ *
+ * @deprecated 3.0 Use DBField->XML() instead.
* @return string
*/
function EscapeXML() {
+ Deprecation::notice('3.0', 'Use DBField->XML() instead.');
return str_replace(array('&','<','>','"'), array('&amp;','&lt;','&gt;','&quot;'), $this->value);
}
View
2 templates/RSSFeed.ss
@@ -10,7 +10,7 @@
<item>
<title>$Title.XML</title>
<link>$AbsoluteLink</link>
- <% if Description %><description>$Description.AbsoluteLinks.EscapeXML</description><% end_if %>
+ <% if Description %><description>$Description.AbsoluteLinks.XML</description><% end_if %>
<% if Date %><pubDate>$Date.Rfc822</pubDate>
<% else %><pubDate>$Created.Rfc822</pubDate><% end_if %>
<% if Author %><dc:creator>$Author.XML</dc:creator><% end_if %>

0 comments on commit 6ecf7ff

Please sign in to comment.