From 6f1a3d18fc90bdf4ca5dff45214dc8874a1b79a2 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 16 Jul 2008 11:27:04 +0000 Subject: Closes #156 & #139 git-svn-id: https://code.elgg.org/elgg/trunk@1437 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/opendd.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'engine/lib/opendd.php') diff --git a/engine/lib/opendd.php b/engine/lib/opendd.php index 7ebd1445b..5f1a3a147 100644 --- a/engine/lib/opendd.php +++ b/engine/lib/opendd.php @@ -209,12 +209,12 @@ foreach ($this->attributes as $k => $v) $attr .= ($v!="") ? "$k=\"$v\" " : ""; - $body = htmlentities($this->getBody(), NULL, 'UTF-8'); + $body = $this->getBody(); $tag = $this->getTagName(); $end = "/>"; if ($body!="") - $end = ">$body"; + $end = ">"; return "<{$tag} $attr" . $end . "\n"; } @@ -310,7 +310,13 @@ $odd->setAttribute($k,$v); // Body - $odd->setBody(html_entity_decode($element->content, NULL, 'UTF-8')); + $body = $element->content; + $a = stripos($body, ""); + if (($body) && ($a!==false) && ($b!==false)) + $body = substr($body, $a+8, $b-($a+8)); + + $odd->setBody($body); } return $odd; -- cgit v1.2.3