summaryrefslogtreecommitdiff
path: root/modules/atom/libraries/Atom_Entry.php
diff options
context:
space:
mode:
authorJozef Selesi <jozefs@users.sourceforge.net>2008-11-23 12:41:41 +0000
committerJozef Selesi <jozefs@users.sourceforge.net>2008-11-23 12:41:41 +0000
commit7485740d9741021b2016df80b225ae4d82b892d0 (patch)
tree9363326a831141fde66c31665af4fb2bacdec3db /modules/atom/libraries/Atom_Entry.php
parentbdbb115296f4002186ee3a99fadc13988dd1509f (diff)
Changed and extended the Atom library a little so that the code for creating entries and feeds has been considerably simplified and reduced.
Diffstat (limited to 'modules/atom/libraries/Atom_Entry.php')
-rw-r--r--modules/atom/libraries/Atom_Entry.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/atom/libraries/Atom_Entry.php b/modules/atom/libraries/Atom_Entry.php
index 345755c2..70bc6e3a 100644
--- a/modules/atom/libraries/Atom_Entry.php
+++ b/modules/atom/libraries/Atom_Entry.php
@@ -24,8 +24,9 @@ class Atom_Entry_Core extends Atom_Base {
return $this;
}
- public function updated($updated) {
- $this->element->appendChild($this->dom->createElement("updated", $updated));
+ public function updated($timestamp) {
+ $this->element->appendChild(
+ $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp)));
return $this;
}
@@ -35,7 +36,7 @@ class Atom_Entry_Core extends Atom_Base {
}
public function content($text, $type="html") {
- $content = $this->dom->createElement("content", $text);
+ $content = $this->dom->createElement("content", html::specialchars($text));
$content->setAttribute("type", $type);
$this->element->appendChild($content);
return $this;