Development

Changeset 10985

You must first sign up to be able to contribute.

Changeset 10985

Show
Ignore:
Timestamp:
08/20/08 09:26:11 (11 months ago)
Author:
dwhittle
Message:

1.1: fixed sfWidget::setXhtml(false)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/widget/sfWidget.class.php

    r9046 r10985  
    276276    } 
    277277 
    278     return sprintf('<%s%s%s', $tag, $this->attributesToHtml($attributes), self::$xhtml ? ' />' : sprintf('></%s>', $tag)); 
     278    return sprintf('<%s%s%s', $tag, $this->attributesToHtml($attributes), self::$xhtml ? ' />' : ('input' != $tag ? sprintf('></%s>', $tag) : '>')); 
    279279  } 
    280280 
  • branches/1.1/test/unit/widget/sfWidgetTest.php

    r7899 r10985  
    159159$t->is(sfWidget::isXhtml(), true, '::isXhtml() return true if the widget must returns XHTML tags'); 
    160160sfWidget::setXhtml(false); 
    161 $t->is($w->renderTag('input', array('value' => 'Test')), '<input value="Test"></input>', '::setXhtml() changesthe value of the XHTML tag'); 
     161$t->is($w->renderTag('input', array('value' => 'Test')), '<input value="Test">', '::setXhtml() changesthe value of the XHTML tag'); 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.