ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
711 stars 107 forks source link

Wrong parsing when using < inside text #88

Open Fire-Dragon-DoL opened 10 years ago

Fire-Dragon-DoL commented 10 years ago

This code comes directly from angular-ui bootstrap template:

<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">
    <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')">
        <span class="sr-only">({{ $index < value ? '*' : ' ' }})</span>
    </i>
</span>

and the plugin fails on

<span class="sr-only">({{ $index < value ? '*' : ' ' }})</span>

I temporary changed it to an ng-bind-template, are there any chance you update the plugin to fix it?

ericclemmons commented 9 years ago

How does the plugin fail? Can you post your config? (I'm assuming you're not using htmlmin...)

Fire-Dragon-DoL commented 9 years ago

Sorry, currently I'm not working on the project anymore. I'll test as soon as I have a few minutes free (quite busy before Christmas)

ericclemmons commented 9 years ago

Me too, but I can predict that it's htmlmin :)

Fire-Dragon-DoL commented 9 years ago

If I'm not wrong, I was running htmlmin after angular templates, because htmlmin does a lot of stuff, but I may actually be wrong, I really don't remember.

anthochamp commented 8 years ago

same here. this is fixable with html-minifier v1.0.0 (commit: https://github.com/kangax/html-minifier/commit/99823dfd1983502c84dfd2b0be0cde85a7cf17e6)... could you fix the package.json ?