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

This file makes minifer hang forever with 100% processor #375

Closed
snowindy opened this issue Jun 8, 2015 · 5 comments
Closed

This file makes minifer hang forever with 100% processor #375

snowindy opened this issue Jun 8, 2015 · 5 comments

Comments

@snowindy
Copy link

snowindy commented Jun 8, 2015

I found this issue when used another plugin tolyo/html-pages-brunch#1 (comment)

Version of plugin is 0.7.2

$ node -v
v0.12.4

<div class="widget-title pm-modal-header"><span class="icon"> <i class="icon-align-justify"></i></span>
    <h5 ng-i18next="app.logged-in.template.raw-template-code"></h5>
</div>

<div class="modal-body pm-modal-full-screen-body pm-boxed-content" style="padding: 40px 0px 60px 0px;>
    <div class="pm-boxed-content-relative">     
        <div class="spinner-large-white" ng-show="loadingTemplate == true"></div>   
        <textarea id="templateCode" pm-code-editor mode="template.mode" content="template.content" width="100%" height="100%"></textarea>
    </div>
</div>
<div class="modal-footer pm-wizard-form-actions">
    <button class="btn btn-primary" ng-click="ok()"><i class="icon-ok icon-white pm-button-icon"></i>OK</button>
</div>

@duncanbeevers
Copy link
Collaborator

This is broken HTML. You can see one of the style tags is unclosed. html-minifier doesn't do well with simply broken markup.

@snowindy
Copy link
Author

snowindy commented Jun 8, 2015

At least it should complain somehow and quit instead of hanging process without a single message.

@snowindy
Copy link
Author

snowindy commented Jun 8, 2015

If you don't like adding pre-validation code you could allow thing to count milliseconds since start of processing of portion of html.
If for example it takes more than, say, 10s - it's definitely a html markup bug - you may report it.

@hwoarangzk
Copy link

I ran into the similar problem. At least I expect html-minfier to throw an error when there is a broken html so that I can catch it. Is there any further updates of html-minifier to solve this issue?

@kangax
Copy link
Owner

kangax commented Jul 3, 2015

Duplicate of #332

@kangax kangax closed this as completed Jul 3, 2015
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

4 participants