Somewhat of a duplicate of http://meta.math.stackexchange.com/questions/419/editing-a-question-containing-formulae-will-remove-the-formulae.
I reposted the question because the previous one
- had a misleading title
- was marked status-completed (possibly based on the title)
- has an accepted answer,
all of which make it look like a resolved issue.
Commenting with, say, $x^2 + x - 3x$
and then editing the comment, you will see x2+x−3xx^2 + x - 3x
An explanation was given by KennyTM in the accepted answer to the previous question:
The raw code of the comment you're going to edit is stored in a hidden <div>
:
<form class="dno" id="edit-comment-1029" style="display: none;">
<div class="dno">
Testing $\LaTeX$ **and** `formatting`.
</div>
</form>
the text content of this <div>
is retrieved and put in the comment editing text box when you click "edit".
However, a <div class="dno">
is not one of the exclusion in TeXification, so the script will turn the $\LaTeX$
into an image in this hidden <div>
:
<form class="dno" id="edit-comment-1029" style="display: none;">
<div class="dno">
Testing
<img src="http://chart.apis.google.com/..." alt="$\LaTeX$">
**and** `formatting`.
</div>
</form>
Because an image is not text, when retrieving the text content the formula will be gone.
You can try to adblock http://sstatic.net/js/third-party/math-tex.js (thus disable TeXifying) and see that the problem is “fixed”.
Edit: Problem still exists in MathJax, but instead of just the image, it becomes this mess:
<div class="dno">
Testing
<span class="MathJax_Preview" style="display: none;"></span><span class="MathJax" role="textbox" aria-readonly="true" style=""><nobr style=""><span class="math" id="MathJax-Span-26"><span style="display: inline-block; position: relative; width: 2.603em; height: 0pt; font-size: 128%;"><span style="position: absolute; top: -2.757em; left: 0em; clip: rect(1.845em, 1000em, 3.169em, -0.554em);"><span class="mrow" id="MathJax-Span-27"><span class="mi" id="MathJax-Span-28" style="font-family: MathJax_Math; font-style: italic;">L</span><span class="mspace" id="MathJax-Span-29" style="height: 0em; vertical-align: 0em; margin-left: -0.325em;"></span><span class="mpadded" id="MathJax-Span-30"><span style="display: inline-block; position: relative; width: 0.521em; height: 0pt;"><span style="position: absolute; top: -2.967em; left: 0em; clip: rect(2.055em, 1000em, 2.952em, -0.561em);"><span class="mrow" id="MathJax-Span-31"><span class="texatom" id="MathJax-Span-32"><span class="mrow" id="MathJax-Span-33"><span class="mrow" id="MathJax-Span-34"><span class="texatom" id="MathJax-Span-35"><span class="mrow" id="MathJax-Span-36"><span class="mi" id="MathJax-Span-37" style="font-size: 70.7%; font-family: MathJax_Math; font-style: italic;">A</span></span></span></span></span></span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span></span><span class="mspace" id="MathJax-Span-38" style="height: 0em; vertical-align: 0em; margin-left: -0.17em;"></span><span class="mi" id="MathJax-Span-39" style="font-family: MathJax_Math; font-style: italic;">T</span><span class="mspace" id="MathJax-Span-40" style="height: 0em; vertical-align: 0em; margin-left: -0.14em;"></span><span class="mpadded" id="MathJax-Span-41"><span style="display: inline-block; position: relative; width: 0.716em; height: 0pt;"><span style="position: absolute; top: -2.542em; left: 0em; clip: rect(1.882em, 1000em, 2.953em, -0.556em);"><span class="mrow" id="MathJax-Span-42"><span class="texatom" id="MathJax-Span-43"><span class="mrow" id="MathJax-Span-44"><span class="mi" id="MathJax-Span-45" style="font-family: MathJax_Math; font-style: italic;">E</span></span></span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span></span><span class="mspace" id="MathJax-Span-46" style="height: 0em; vertical-align: 0em; margin-left: -0.115em;"></span><span class="mi" id="MathJax-Span-47" style="font-family: MathJax_Math; font-style: italic;">X</span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span><span style="border-left: 0em solid; display: inline-block; overflow: hidden; width: 0pt; height: 1.152em; vertical-align: -0.276em;"></span></span></nobr></span>
<script type="math/tex" id="MathJax-Element-2">\LaTeX</script>
**and** `formatting`.
</div>
This leads to Testing LATEX\LaTeX **and** ‘formatting‘
in the text box. The first LATEX
is the TeXified result, and second \LaTeX
is from the <script type="math/tex">
.