diff options
author | Evan Prodromou <evan@status.net> | 2010-03-13 06:36:25 -0600 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-13 06:36:25 -0600 |
commit | c1e96cbdefa66e66815c421378b9452d7c8d5548 (patch) | |
tree | a08e80d705d08ffb33233991bf80e7c19867552a /lib/activity.php | |
parent | a2cc26ba8a21aa3614ebfc4a77c0bec9ffb2655d (diff) | |
parent | 9e9ab23e1f936eb62014d8f7b0051f0314ae482c (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/activity.php')
-rw-r--r-- | lib/activity.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/activity.php b/lib/activity.php index 2cb80f9e1..125d391b0 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -78,7 +78,7 @@ class PoCoAddress if (!empty($this->formatted)) { $xs = new XMLStringer(true); $xs->elementStart('poco:address'); - $xs->element('poco:formatted', null, $this->formatted); + $xs->element('poco:formatted', null, common_xml_safe_str($this->formatted)); $xs->elementEnd('poco:address'); return $xs->getString(); } @@ -279,7 +279,7 @@ class PoCo ); if (!empty($this->note)) { - $xs->element('poco:note', null, $this->note); + $xs->element('poco:note', null, common_xml_safe_str($this->note)); } if (!empty($this->address)) { @@ -805,7 +805,6 @@ class ActivityObject return $object; } - function asString($tag='activity:object') { $xs = new XMLStringer(true); @@ -817,16 +816,28 @@ class ActivityObject $xs->element(self::ID, null, $this->id); if (!empty($this->title)) { - $xs->element(self::TITLE, null, $this->title); + $xs->element( + self::TITLE, + null, + common_xml_safe_str($this->title) + ); } if (!empty($this->summary)) { - $xs->element(self::SUMMARY, null, $this->summary); + $xs->element( + self::SUMMARY, + null, + common_xml_safe_str($this->summary) + ); } if (!empty($this->content)) { // XXX: assuming HTML content here - $xs->element(ActivityUtils::CONTENT, array('type' => 'html'), $this->content); + $xs->element( + ActivityUtils::CONTENT, + array('type' => 'html'), + common_xml_safe_str($this->content) + ); } if (!empty($this->link)) { |