paolochiodi / htmlcompressor

A work in progress port of google's htmlcompressor.jar
Other
152 stars 26 forks source link

The simple_boolean_attributes strips non-boolean attributes #12

Closed riddla closed 10 years ago

riddla commented 10 years ago

Hi there.

I just noticed in an app that is using AngularJS, that middleman-minify-html (which relies on the htmlcompressor gem) strips some values:

Seems to me that the simple_boolean_attributes option, when activated, strips this valid e.g. non-boolean attributes. Maybe the BOOLEAN_ATTR_PATTERN is mismatching?

PS: Same applies probably to ng-selected, ng-checked and ng-readonly.

paolochiodi commented 10 years ago

Hi, thank you for reporting... you are right: BOOLEAN_ATTR_PATTERN is mismatching.

I'm looking into this

Paolo

tomchentw commented 10 years ago

Same error happens for Batman.js too.

data-bind-disabled="submitting_form"

is stripped out as data-bind-disabled only

paolochiodi commented 10 years ago

Hi guys I finally fixed this issue and published version 1.1.2, sorry for the time it took. Let me know how is working for you.