grunt-angular-templates icon indicating copy to clipboard operation
grunt-angular-templates copied to clipboard

Wrong parsing when using < inside text

Open Fire-Dragon-DoL opened this issue 11 years ago • 5 comments

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?

Fire-Dragon-DoL avatar May 09 '14 21:05 Fire-Dragon-DoL

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

ericclemmons avatar Dec 22 '14 15:12 ericclemmons

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)

Fire-Dragon-DoL avatar Dec 22 '14 15:12 Fire-Dragon-DoL

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

ericclemmons avatar Dec 22 '14 15:12 ericclemmons

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.

Fire-Dragon-DoL avatar Dec 22 '14 16:12 Fire-Dragon-DoL

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 ?

anthochamp avatar Nov 25 '15 17:11 anthochamp