X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/86e2bfee428466ce0947de4db3033fd699a67fe4..5b89506db3b83f20f5c3ddafd35e02a42e690318:/pear_lib_tmp/HTML/Image.php?ds=sidebyside diff --git a/pear_lib_tmp/HTML/Image.php b/pear_lib_tmp/HTML/Image.php index fd173af..1be3923 100644 --- a/pear_lib_tmp/HTML/Image.php +++ b/pear_lib_tmp/HTML/Image.php @@ -32,13 +32,6 @@ require_once 'HTML/Common.php'; * @access public */ class HTML_Image extends HTML_Common { - /** - * List of valid HTML attributes for an Image. - * - * @var array $validAttrs - * @access protected - */ - var $_validAttrs = array('src', 'alt', 'longdesc', 'width', 'height', 'usemap', 'ismap', 'align', 'border', 'hspace', 'vspace', 'id', 'class', 'style', 'title', 'lang', 'dir', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup'); // ~X2C @@ -53,7 +46,7 @@ class HTML_Image extends HTML_Common { * @return void * @access public */ - function HTML_Image($src = '', $alt = '', $attrs = array()// ~X2C + function HTML_Image($src = '', $alt = '', $attrs = array())// ~X2C { if (is_array($attrs)) { $attrs['src'] = $src; @@ -75,7 +68,8 @@ class HTML_Image extends HTML_Common { function toHtml()// ~X2C { $attrs = ''; - foreach ($this->getAttributes() as $key => $val) { + $attributes = $this->getAttributes() + array('border' => 0, 'align' => 'middle'); + foreach ($attributes as $key => $val) { $attrs .= ' ' . $key . '="' . htmlentities($val) . '"'; } return "";