Problem with the content of the html attributes
See original GitHub issueI am having trouble minifying a page that contains the following code:
<img alt="Vínculo al registro detallado" id="hover_1151553" class="item-image defer-image|http://www.example.com/rpsweb/othumb?id=NL$1151553$PDF&s=e" data-dialog='{"isHover":true,"isShowVerticalPopups":true,"container":"#hover","url":"Carousel/Hover","dialogClass":"epdialog preview-hoverdialog","width":340,"data":{"title":"Ecografía en medicina intensiva","author":"Lumb, Philip D.","publisher":"Elsevier","isebook":true,"isabook":false,"iteman":"1151553","itemdb":"nlebk","itemtag":"AN","itemdoid":"NL$1151553$PDF","hoverid":"hover_1151553","downloadable":true}}' />
When minifying it replaces some characters, for example the character “|” by " ", from the content of the attribute “class”
<img alt="Vínculo al registro detallado" id=hover_1151786 class="item-image defer-image http://www.example.com/rpsweb/othumb?id=NL$1151786$PDF&s=e" data-dialog="{"isHover":true,"isShowVerticalPopups":true,"container":"#hover","url":"Carousel/Hover","dialogClass":"epdialog preview-hoverdialog","width":340,"data":{"title":"Stevens y Lowe. Histología humana + StudentConsult","author":"Lowe, J. S.","publisher":"Elsevier","isebook":true,"isabook":false,"iteman":"1151786","itemdb":"nlebk","itemtag":"AN","itemdoid":"NL$1151786$PDF","hoverid":"hover_1151786","downloadable":true}}">
The settings currently are as follows:
HtmlMinificationSettings settings = options.MinificationSettings;
settings.RemoveRedundantAttributes = true;
settings.RemoveHttpProtocolFromAttributes = false;
settings.RemoveHttpsProtocolFromAttributes = false;
settings.RemoveHtmlComments = false;
options.CssMinifierFactory = new NUglifyCssMinifierFactory();
options.JsMinifierFactory = new CrockfordJsMinifierFactory();
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
In version 2.8.6, I improved a performance of the class directive processing.
@Taritsyn Thank you very much, I have updated it and it works fine.