Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the content of the html attributes #113

Closed
germanyesid opened this issue Jun 28, 2020 · 5 comments
Closed

Problem with the content of the html attributes #113

germanyesid opened this issue Jun 28, 2020 · 5 comments

Comments

@germanyesid
Copy link

I 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&amp;s=e" data-dialog="{&#34;isHover&#34;:true,&#34;isShowVerticalPopups&#34;:true,&#34;container&#34;:&#34;#hover&#34;,&#34;url&#34;:&#34;Carousel/Hover&#34;,&#34;dialogClass&#34;:&#34;epdialog preview-hoverdialog&#34;,&#34;width&#34;:340,&#34;data&#34;:{&#34;title&#34;:&#34;Stevens y Lowe. Histología humana + StudentConsult&#34;,&#34;author&#34;:&#34;Lowe, J. S.&#34;,&#34;publisher&#34;:&#34;Elsevier&#34;,&#34;isebook&#34;:true,&#34;isabook&#34;:false,&#34;iteman&#34;:&#34;1151786&#34;,&#34;itemdb&#34;:&#34;nlebk&#34;,&#34;itemtag&#34;:&#34;AN&#34;,&#34;itemdoid&#34;:&#34;NL$1151786$PDF&#34;,&#34;hoverid&#34;:&#34;hover_1151786&#34;,&#34;downloadable&#34;: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();

@Taritsyn
Copy link
Owner

Hello, German!

Thanks for information! I will try to solve this problem in the next few days.

@Taritsyn
Copy link
Owner

This error is fixed in version 2.8.5.

@germanyesid
Copy link
Author

@Taritsyn Thank you very much, I have updated it and it works fine.

@Taritsyn Taritsyn closed this as completed Jul 1, 2020
@germanyesid
Copy link
Author

Hello @Taritsyn

Although the error has been fixed, in some pages the processing takes a long time, after these changes.

I share with you a page which before the changes only took milliseconds to process, but now it takes between 20 and 30 seconds!.

Example.txt

@Taritsyn
Copy link
Owner

Taritsyn commented Jul 3, 2020

In version 2.8.6, I improved a performance of the class directive processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants