Hello,
I have a fresh installation 1.9.2.
I created a new page with some text in it: http://beadsoft.net/wtest/index.php?title=Textloss&oldid=42
between the <pre>-tags I do have HTML-coding.
When I use the edit-function on a later section AND insert a new heading of the same level, the text of the whole article will be corrupted.
I had * loosing text after the new section * doubling of sections * complete corruption
You are invited to play in my testwiki, see link above.
regards, Gunter
If you want to try your own wiki, copy and paste the following text.
-----
== HTML source == <pre> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Verweis-sensitive Grafiken definieren</title> </head> <body>
<h1>Schnell zur Stadt oder Region Ihrer Wahl!</h1>
<div> <map name="Landkarte"> <area shape="rect" coords="11,10,59,29" href="http://www.koblenz.de/" alt="Koblenz"> <area shape="rect" coords="42,36,96,57" href="http://www.wiesbaden.de/" alt="Wiesbaden"> <area shape="rect" coords="42,59,78,80" href="http://www.mainz.de/" alt="Mainz"> <area shape="rect" coords="100,26,152,58" href="http://www.frankfurt.de/" alt="Frankfurt"> <area shape="rect" coords="27,113,93,134" href="http://www.mannheim.de/" alt="Mannheim"> <area shape="rect" coords="100,138,163,159" href="http://www.heidelberg.de/" alt="Heidelberg"> <area shape="rect" coords="207,77,266,101" href="http://www.wuerzburg.de/" alt="Würzburg"> <area shape="rect" coords="282,62,344,85" href="http://www.bamberg.de/" alt="Bamberg"> <area shape="rect" coords="255,132,316,150" href="http://www.nuernberg.de/" alt="Nürnberg"> <area shape="rect" coords="78,182,132,200" href="http://www.karlsruhe.de/" alt="Karlsruhe"> <area shape="rect" coords="142,169,200,193" href="http://www.heilbronn.de/" alt="Heilbronn"> <area shape="rect" coords="140,209,198,230" href="http://www.stuttgart.de/" alt="Stuttgart"> <area shape="rect" coords="187,263,222,281" href="http://www.ulm.de/" alt="Ulm"> <area shape="rect" coords="249,278,304,297" href="http://www.augsburg.de/" alt="Augsburg"> <area shape="poly" coords="48,311,105,248,96,210,75,205,38,234,8,310" href="http://www.baden-aktuell.de/" alt="Baden"> </map> </div>
<p><img src="karte.png" width="345" height="312" alt="Karte" usemap="#Landkarte"></p>
</body> </html> </pre>
== Title 1 ==
Text 1
== Title 2 ==
Text 2
== Title 3 ==
Text 3
== Title 4 ==
Text 4
== Title 5 ==
Text 5
You should never be setting DOCTYPE or <html><head><body> tags. These go once on each html page *and have already been sent* by MediaWiki. You only write content html tags.
Platonides schrieb:
You should never be setting DOCTYPE or <html><head><body> tags. These go once on each html page *and have already been sent* by MediaWiki. You only write content html tags.
As if I would not know...
I still have the need to document HTML-Code, that is why I surround it by <pre> ... </pre> so it would not get interpreted. <code> ... </code> is not helpful either.
Actually, it it not any of the suggested tags, that are causing problems, it is more within the <div>-section.
Problem remains.
Gunter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Moin,
On Saturday 10 February 2007 19:09:30 Gunter wrote:
Hello,
I have a fresh installation 1.9.2.
I created a new page with some text in it: http://beadsoft.net/wtest/index.php?title=Textloss&oldid=42
between the <pre>-tags I do have HTML-coding.
You need:
* to put these in <nowiki>..</nowiki> * and escape all the "<" and probably ">" with "<" and ">".
Otherwise your browser will interpret the HTML it is send and do funky stuff like corrupting the text on edit etc.
if you just put valid HTMl code between <pre>, it will get interpreted by the browser. This is usefull if you want, f.i. red text inside pre, but useless for everything else.
best wishes,
tels
- -- Signed on Sat Feb 10 23:40:38 2007 with key 0x93B84C15. Get one of my photo posters: http://bloodgate.com/posters PGP key on http://bloodgate.com/tels.asc or per email.
"Zudem könnten nun nicht mehr nur Täter, sondern auch Opfer abgehört werden, um diese besser zu schützen." Jörg Bode, FDP - http://heise.de/newsticker/data/anw-11.12.03-003/
between the <pre>-tags I do have HTML-coding. I had
- loosing text after the new section
- doubling of sections
- complete corruption
I've noticed that using the <pre> tag does sometimes cause the paragraph after the </pre> to disappear. Switching to <nowiki> seems to fix the problem, but you then need to escape any code by hand, e.g. using > as Tels suggested.
Cheers, Adam.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Moin,
On Sunday 11 February 2007 01:00:17 Adam Nielsen wrote:
between the <pre>-tags I do have HTML-coding. I had
- loosing text after the new section
- doubling of sections
- complete corruption
I've noticed that using the <pre> tag does sometimes cause the paragraph after the </pre> to disappear. Switching to <nowiki> seems to fix the problem, but you then need to escape any code by hand, e.g. using > as Tels suggested.
In normal HTML, even inside <pre> you need to escape, because otherwise the browser simple interpretes the HTML. Witness:
<pre> <font color="red">Red!</font> </pre>
in a normal HTML page. What happens if you enter things like <body>, <html> etc. is anybodies guess :)
However, it seems that Mediawiki always escapes "<" and ">" for you inside <pre>. Strange, I didn't know this. Maybe the escaping has a bug and does not always escape everything?
In any event you can also combine these two like so:
<pre><nowiki> <font color="red">Red!</font> </nowiki></pre>
Best wishes,
Tels
- -- Signed on Sun Feb 11 11:18:59 2007 with key 0x93B84C15. Get one of my photo posters: http://bloodgate.com/posters PGP key on http://bloodgate.com/tels.asc or per email.
"A Thaum is the basic unit of magical strength. It has been universally established as the amount of magic needed to create one small white pigeon or three normal-sized billiard balls." -- Terry Pratchett
mediawiki-l@lists.wikimedia.org