X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fhtmloutputter.php;h=7780b1c19d0c3af05980860ea1d3ae46efcb8a84;hb=2d063650effb22c90936a4588f44946c69e1d9a1;hp=37853f345fa64b3e24ff1b52934ecd253496cd40;hpb=f46fd284e4395a113cdcc6e019d6f1b4b9ef8ff6;p=quix0rs-gnu-social.git diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 37853f345f..7780b1c19d 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -108,6 +108,8 @@ class HTMLOutputter extends XMLOutputter } header('Content-Type: '.$type); + + $this->extraHeaders(); $this->startXML('html', '-//W3C//DTD XHTML 1.0 Strict//EN', @@ -132,6 +134,16 @@ class HTMLOutputter extends XMLOutputter $this->elementEnd('html'); $this->endXML(); } + + /** + * To specify additional HTTP headers for the action + * + * @return void + */ + function extraHeaders() + { + // Needs to be overloaded + } /** * Output an HTML text input element @@ -160,7 +172,7 @@ class HTMLOutputter extends XMLOutputter 'type' => 'text', 'id' => $id); if ($value) { - $attrs['value'] = htmlspecialchars($value); + $attrs['value'] = $value; } $this->element('input', $attrs); if ($instructions) { @@ -194,7 +206,7 @@ class HTMLOutputter extends XMLOutputter 'class' => 'checkbox', 'id' => $id); if ($value) { - $attrs['value'] = htmlspecialchars($value); + $attrs['value'] = $value; } if ($checked) { $attrs['checked'] = 'checked'; @@ -204,7 +216,7 @@ class HTMLOutputter extends XMLOutputter } $this->element('input', $attrs); $this->text(' '); - $this->element('label', array('class' => 'checkbox_label', + $this->element('label', array('class' => 'checkbox', 'for' => $id), $label); $this->text(' '); @@ -313,13 +325,14 @@ class HTMLOutputter extends XMLOutputter * @todo add a $name parameter */ - function submit($id, $label, $cls='submit', $name=null) + function submit($id, $label, $cls='submit', $name=null, $title=null) { $this->element('input', array('type' => 'submit', 'id' => $id, 'name' => ($name) ? $name : $id, 'class' => $cls, - 'value' => $label)); + 'value' => $label, + 'title' => $title)); } /**