Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

HTML minification RegEx causing stack overflow in Apache. #56

@CaelanStewart

Description

@CaelanStewart

I was getting a connection reset error on every page load with no errors logged anywhere. It took me a while to locate the exact line, I had to keep moving an exit() call around until I found the offending piece of code.

Of course this can be solved by increasing the stack size, but so this plugin can be used in more limited environments, it might be worth not using a big regular expression, and instead opting for a different technique (seen here).

I modified AIOM to use this method, and it seems to do a better job of HTML minification as it also minifies inline styles and scripts. Though there are a couple of issues with it removing conditional comments, I think it's still worth looking into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions