• Resolved netimm

    (@netimm)


    Oryginal page looks like this:

    <p>Przestawiamy Państwu realizacj? <strong><a href="https://www.instaglass.pl/oferta/balustrady-szklane/">balustrady szklanej</a> </strong>zewn?trznej <strong>oraz</strong> <strong>balustrady francuskiej</strong>.</p>

    Przestawiamy Państwu realizacj? balustrady szklanej zewn?trznej oraz balustrady francuskiej.

    after minification changes to:

    <p>Przestawiamy Państwu realizacj? <strong><a href="https://www.instaglass.pl/oferta/balustrady-szklane/">balustrady szklanej</a></strong>zewn?trznej <strong>oraz</strong><strong>balustrady francuskiej</strong>.</p>

    Przestawiamy Państwu realizacj? balustrady szklanejzewn?trznej orazbalustrady francuskiej.

    —-
    There are no white space within szklanejzewn?trznej and orazbalustrady.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    That is because your HTML code is not formatted properly. There should be no white space between html tags, and there is no need to have duplicate consecutive tags.

    So instead of:
    <strong>oraz</strong> <strong>balustrady francuskiej</strong>

    you should use:
    <strong>oraz balustrady francuskiej</strong>

    In fact, you should actually be using css for making the link bold, not surrounding with a strong tag.

    Since you are using multiple strong tags, they should be merged.
    You can use:

    <strong><a href="https://www.instaglass.pl/oferta/balustrady-szklane/">balustrady szklanej</a> zewn?trznej oraz balustrady francuskiej</strong>

    All those strong tags in-between are clutter and should not be there.
    What the minification is doing is simply removing spaces between tags.

    If you don’t want to correct your html code, then you can disable HTML minification and it will leave the spaces alone.

    Thread Starter netimm

    (@netimm)

    I agree that it could be better, but:

    1. “not formatted properly” – do you mean it violates some html rules ? I don’t think so.
    2. “There should be no white space between html tags” – I believe html it is acceptable.
    3. This code was generated by Elementor, text editor widget.

    so, if it doesn’t violate html rules, and contains white space, you shouldn’t remove it.

    Plugin Author Raul P.

    (@alignak)

    No, it doesn’t violate any rules, but it’s not best practice (autogenerated or not).
    However, minification is doing what needs to be done, which is to remove extra white spaces, including those between tags.

    If you don’t want to remove spaces, you can disable html minification, else that is exactly what that feature does.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML Minification is too agresive’ is closed to new replies.