forked from GNUsocial/gnu-social
Easier to modify DTD for HTMLOutputter
This commit is contained in:
parent
0a0455b8d2
commit
f642da201d
@ -28,11 +28,7 @@
|
|||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/xmloutputter.php';
|
|
||||||
|
|
||||||
// Can include XHTML options but these are too fragile in practice.
|
// Can include XHTML options but these are too fragile in practice.
|
||||||
define('PAGE_TYPE_PREFS', 'text/html');
|
define('PAGE_TYPE_PREFS', 'text/html');
|
||||||
@ -58,6 +54,9 @@ define('PAGE_TYPE_PREFS', 'text/html');
|
|||||||
|
|
||||||
class HTMLOutputter extends XMLOutputter
|
class HTMLOutputter extends XMLOutputter
|
||||||
{
|
{
|
||||||
|
protected $DTD = array('doctype' => 'html',
|
||||||
|
'spec' => '-//W3C//DTD XHTML 1.0 Strict//EN',
|
||||||
|
'uri' => 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -120,9 +119,8 @@ class HTMLOutputter extends XMLOutputter
|
|||||||
// Required for XML documents
|
// Required for XML documents
|
||||||
$this->startXML();
|
$this->startXML();
|
||||||
}
|
}
|
||||||
$this->xw->writeDTD('html',
|
|
||||||
'-//W3C//DTD XHTML 1.0 Strict//EN',
|
$this->writeDTD();
|
||||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
|
|
||||||
|
|
||||||
$language = $this->getLanguage();
|
$language = $this->getLanguage();
|
||||||
|
|
||||||
@ -138,6 +136,18 @@ class HTMLOutputter extends XMLOutputter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setDTD($doctype, $spec, $uri)
|
||||||
|
{
|
||||||
|
$this->DTD = array('doctype' => $doctype, 'spec' => $spec, 'uri' => $uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function writeDTD()
|
||||||
|
{
|
||||||
|
$this->xw->writeDTD($this->DTD['doctype'],
|
||||||
|
$this->DTD['spec'],
|
||||||
|
$this->DTD['uri']);
|
||||||
|
}
|
||||||
|
|
||||||
function getLanguage()
|
function getLanguage()
|
||||||
{
|
{
|
||||||
// FIXME: correct language for interface
|
// FIXME: correct language for interface
|
||||||
|
Loading…
Reference in New Issue
Block a user