Make error HTML valid XHTML
Allows easy parsing using XML tools Change-Id: I27b5a8b719d703636c2c09d513cd04766fc66ce1
This commit is contained in:
parent
64d0b3e3ea
commit
d51e0ae06a
|
@ -214,7 +214,7 @@ abstract class MathRenderer {
|
|||
$mf = wfMessage( 'math_failure' )->inContentLanguage()->escaped();
|
||||
$errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped();
|
||||
$source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) );
|
||||
return "<strong class='error texerror'>$mf ($errmsg): $source</strong>\n";
|
||||
return "<strong class=\"error texerror\">$mf ($errmsg): $source</strong>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2123,7 +2123,7 @@
|
|||
{
|
||||
"input": " with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped <math> tags. [[Image:foobar.jpg|thumb|<math>2+2",
|
||||
"params": [],
|
||||
"output": "<strong class='error texerror'>Failed to parse (syntax error): {\\displaystyle with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped &lt;math&gt; tags. [[Image:foobar.jpg|thumb|<math>2+2}<\/strong>\n"
|
||||
"output": "<strong class=\"error texerror\">Failed to parse (syntax error): {\\displaystyle with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped &lt;math&gt; tags. [[Image:foobar.jpg|thumb|<math>2+2}<\/strong>\n"
|
||||
},
|
||||
{
|
||||
"input": " with a thumbnail- math enabled [[Image:foobar.jpg|thumb|<math>2+2",
|
||||
|
@ -2293,12 +2293,12 @@
|
|||
{
|
||||
"input": "",
|
||||
"params": [],
|
||||
"output": "<strong class='error texerror'>Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n"
|
||||
"output": "<strong class=\"error texerror\">Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n"
|
||||
},
|
||||
{
|
||||
"input": " ",
|
||||
"params": [],
|
||||
"output": "<strong class='error texerror'>Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n"
|
||||
"output": "<strong class=\"error texerror\">Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n"
|
||||
},
|
||||
{
|
||||
"input": "\\left(\\begin{smallmatrix}a & b\\\\ c & d\\end{smallmatrix}\\right)",
|
||||
|
@ -2310,4 +2310,4 @@
|
|||
"params": [],
|
||||
"output": "<img src=\"085412b37ef2ac62058f72715866515b3ee71f39\" class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" style=\"vertical-align: -1.171ex; width:1.417ex; height:3.343ex;\" alt=\"{\\displaystyle \\AA}\"\/>"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue