math inside text inside math
Open, Needs TriagePublic

Description

Have a look to this page: https://it.wikitolearn.org/Corso:Algebra_IV_I1/Esercizi/Undicesimo_esercizio
the wikitext is:

<math display="block">\phi_{pn}(x) = \begin{cases} \phi_n(x^p) &\textrm{se $p \mid n$} \\ \frac{\phi_n(x^p)}{\phi_n(x)} &\textrm{se $ p \nmid n$} \end{cases}</math>

that is rendered into

\[\phi _{pn}(x)={\begin{cases}\phi _{n}(x^{p})&{\textrm {se\$p\mid n\$}}\\{\frac {\phi _{n}(x^{p})}{\phi _{n}(x)}}&{\textrm {se\$p\nmid n\$}}\end{cases}}\]

which breaks