From 2c420cc5eba9cd89b9daf0e10c750a34672a4795 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 29 Oct 2010 23:38:00 +0000 Subject: New Start/EndHtmlElement events. Allows adding namespaces. --- lib/htmloutputter.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 42bff4490..b341d1495 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -119,9 +119,16 @@ class HTMLOutputter extends XMLOutputter $language = $this->getLanguage(); - $this->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', - 'xml:lang' => $language, - 'lang' => $language)); + $attrs = array( + 'xmlns' => 'http://www.w3.org/1999/xhtml', + 'xml:lang' => $language, + 'lang' => $language + ); + + if (Event::handle('StartHtmlElement', array($this, &$attrs))) { + $this->elementStart('html', $attrs); + Event::handle('EndHtmlElement', array($this, &$attrs)); + } } function getLanguage() -- cgit v1.2.3-54-g00ecf