artlantis / phamlp

Automatically exported from code.google.com/p/phamlp
0 stars 0 forks source link

true and false attribute values not parsed correctly in HamlParser #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Input: %option{:selected => true}
Expected: <option selected="selected">
Actual: <option selected="">

Input: %input{:type => 'checkbox', :checked => false}
Expected: <input type="checkbox">
Actual: <option type="checkbox" checked="">

What version of the product are you using?
3.2

Patch included, here's the change:

haml/HamlParser.php on line 955 from:
elseif ($attr[6] === '') {
to:
elseif (!isset($attr[7])) {

Original issue reported on code.google.com by cryo...@gmail.com on 26 Apr 2011 at 8:15

Attachments: