cgross / grunt-dom-munger

Grunt task to read and manipulate HTML with CSS selectors.
MIT License
93 stars 40 forks source link

&& broken #23

Closed gtesslerge closed 10 years ago

gtesslerge commented 10 years ago

Using aaa6969 : { optionjjkjkjks: { prefix: { selector: 'div.span4', attribute:'class', value:'aaa6969' } }, src: 'documentation/src/ngDocs/index.html', dest: 'documentation/src/ngDocs/1.html' },

ruins my output. convertts && to escaped. Why?

     <div class="dropdown search" ng-class="{open: focused &amp;&amp; bestMatch.rank &gt; 0 &amp;&amp; bestMatch.page != currentPage}">
        <input type="text" ng-model="search" placeholder="search the docs" tabindex="1" accesskey="s" class="search-query" focused="focused">

when should stay as:

     <div class="dropdown search"
           ng-class="{open: focused && bestMatch.rank > 0 && bestMatch.page != currentPage}">
        <input type="text" ng-model="search" placeholder="search the docs"
               tabindex="1" accesskey="s" class="search-query" focused="focused">
cgross commented 10 years ago

This is caused by the underlying cheerio engine: https://github.com/cheeriojs/cheerio/issues/466

Does angular get confused by the escaping?