Forums

why wordpress changes the order of closing tag of (1 post)

  1. hanyuliang
    Member
    Posted 8 months ago #

    I stored the following mathml code in database correctly. However, when it is displayed, seems wordpress changes the order of closing tag "mrow" inside "mfrac". So the rendered math expression is wrong.

    This is the original mathml code:

    <math>
    <mrow>
    <mi selected="true">f</mi>
    <mo stretchy="false">(</mo>
    <mi>x</mi>
    <mo stretchy="false">)</mo>
    <mo>=</mo>
    <mo>−</mo>
    <mfrac>
    <mi>x</mi>
    <mrow>
    <mn>1</mn>
    <mo>+</mo>
    <mrow>
    <mo>|</mo>
    <mi>x</mi>
    <mo>|</mo>
    </mrow>
    </mrow>
    </mfrac>
    <mo stretchy="false">(</mo>
    <mi>x</mi>
    <mo>∈</mo>
    <mi>R</mi>
    <mo stretchy="false">)</mo>
    </mrow>
    </math>

    This is the html code rendered in browser:

    <math>
    <mrow>
    <mi selected="true">f</mi>
    <mo stretchy="false">(</mo>
    <mi>x</mi>
    <mo stretchy="false">)</mo>
    <mo>=</mo>
    <mo>−</mo>
    <mfrac>
    <mi>x</mi>
    <mrow>
    <mn>1</mn>
    <mo>+</mo>
    </mrow>
    <mrow>
    <mo>|</mo>
    <mi>x</mi>
    <mo>|</mo>
    </mrow>
    </mfrac>
    <mo stretchy="false">(</mo>
    <mi>x</mi>
    <mo>∈</mo>
    <mi>R</mi>
    <mo stretchy="false">)</mo>
    </mrow>
    </math>

Reply

You must log in to post.

About this Topic

Tags