}
function appendElement($name, $value = '') {
- return $this->appendChild($this->createElement($name, $value));
+ // Adding the $value in createElement does NOT escape it, so use appendText to support that.
+ $aelem = $this->appendChild($this->createElement($name));
+ $aelem->appendText($value);
+ return $aelem;
}
function appendElementXML($name, $xmldata) {
$aelem = $this->appendChild($this->createElement($name));
}
function createElementLink($target, $value = '') {
- $link = $this->createElement('a', $value);
+ $link = $this->createElement('a');
+ $link->appendText($value);
$link->setAttribute('href', $target); // XXX: take care of & etc. in links
return $link;
}
// returns the new child
function appendElement($name, $value = '') {
- return $this->appendChild($this->ownerDocument->createElement($name, $value));
+ // Adding the $value in createElement does NOT escape it, so use appendText to support that.
+ $aelem = $this->appendChild($this->ownerDocument->createElement($name));
+ $aelem->appendText($value);
+ return $aelem;
}
function appendElementXML($name, $xmldata) {
$aelem = $this->appendChild($this->ownerDocument->createElement($name));
// returns the new child
function appendElement($name, $value = '') {
- return $this->appendChild($this->ownerDocument->createElement($name, $value));
+ // Adding the $value in createElement does NOT escape it, so use appendText to support that.
+ $aelem = $this->appendChild($this->ownerDocument->createElement($name));
+ $aelem->appendText($value);
+ return $aelem;
}
function appendElementXML($name, $xmldata) {
$aelem = $this->appendChild($this->ownerDocument->createElement($name));