Support » Plugin: Simply Static » header element cannot include other elements?

  • Resolved idoc

    (@idoc)


    – PHP 8.0.3
    – WordPress 5.7
    – Simply Static 2.1.3

    I convert static page includes code below by Simply Static but it generate strange HTML. Is this code invalid? This issue is not occurred on Simply Static 2.1.0, WordPress 5.0.6, PHP 5.3.29.

    – Original code

    
    <h5>Header Title
        <p>
            <span class="green">Title1</span> Value1 
            <span class="orange">Title2</span> Value2
        </p>
    </h5>
    

    – Converted HTML

    
    <h5>Header Title</h5>
        <p>
            <span class="green">Title1</span> Value1 
            <span class="orange">Title2</span> Value2
        </p>
    
    • This topic was modified 1 month, 3 weeks ago by idoc.
    • This topic was modified 1 month, 3 weeks ago by idoc.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @idoc,

    thanks for your report.

    To be honest, Simply Static isn’t really tested with PHP 8 as of today, but the problem should not be the PHP version, it’s more about the markup itself.

    In the background simpledom (PHP) handles the conversion and included an automatic markup fixer (based on some rules of W3C) ,that could be the problem here.

    Have you checked it with PHP 7?

    Thread Starter idoc

    (@idoc)

    Hi @patrickposner

    Thank you for the reply. I retry convert on the environment below but same result.
    – WordPress 5.7, PHP 7.2
    – WordPress 5.7, PHP 7.4
    *Simply Static 2.1.3 require PHP 7.2 so I couldn’t try more older version of PHP.

    It may behavior of markup fixer changed between PHP 5.0 and PHP 7.2. We’ll change our HTML for avoid this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.