h1 Tag causes saved page to have missing data (section editing)
Closed, ResolvedPublic

Description

Author: bjkcubed

Description:
It seems using the h1 tag in a wiki page causes issues with editing sections. These results are not seen with 1.6.8 but are seen with
1.7 and 1.8.

Start out with:

Heading 1

<pre>
<h1>test</h1>
</pre>

Heading 2

If you click on Heading 2 to edit that section and then save that page you will get the result below.

Heading 1

<pre>

Heading 2

asdf

In the example above I added the asdf when editing the second section, as you see data is lost. Editing section 1 creates even more
strange results. Starting with the first example and editing section 1 I get the following output.

Heading 1

asdf
<pre>
<h1>test</h1>
</pre>

<h1>test</h1>
</pre>

Heading 2


Version: 1.10.x
Severity: normal
OS: Linux
Platform: Other

bzimport added a project: MediaWiki-Page-editing.Via ConduitNov 21 2014, 9:28 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz7713.
bzimport created this task.Via LegacyOct 25 2006, 10:46 PM
bzimport added a comment.Via ConduitOct 25 2006, 10:48 PM

bjkcubed wrote:

More server information...

MediaWiki: 1.8.2
PHP: 5.1.6 (apache2handler)
MySQL: 5.0.24a-standard

bzimport added a comment.Via ConduitJan 19 2007, 10:30 PM

bjkcubed wrote:

Bug still remains in version 1.9

MediaWiki: 1.9.0
PHP: 5.1.6 (apache2handler)
MySQL: 5.0.24a-standard-log

bzimport added a comment.Via ConduitFeb 22 2007, 5:47 PM

alan.harder wrote:

I also hit this problem (in version 1.9.2 and 1.9.3) but with h2 tags inside a pre.

It seems that code generating the section [edit] links properly skips over the
h2-inside-pre since it is rendered with the < and > encoded as html entities.
However, the code saving the changes probably sees the raw text and counts this
as a section boundary, thus saving and overwriting the wrong section!

brion added a comment.Via ConduitFeb 23 2007, 6:39 AM

Can confirm with 1.9, but seems fine on 1.10 w/ current trunk.

bzimport added a comment.Via ConduitMay 2 2007, 4:31 PM

hempel wrote:

This is still an open issue with 1.10. All you need is a page with multiple
sections, some of which contain <pre> areas. Then go to a section right after
one with a <pre> tag in it, edit it, and add a new section, thus splitting the
section in half. When you save it is almost always corrupted. Just tried this
with 1.10RC1.

bzimport added a comment.Via ConduitMay 2 2007, 4:32 PM

hempel wrote:

This is still an open issue with 1.10. All you need is a page with multiple
sections, some of which contain <pre> areas. Then go to a section right after
one with a <pre> tag in it, edit it, and add a new section, thus splitting the
section in half. When you save it is almost always corrupted. Just tried this
with 1.10RC1.

bzimport added a comment.Via ConduitMay 4 2007, 8:43 PM

bjkcubed wrote:

Just to confirm that the original example still has the same result on 1.10.0rc1.

bzimport added a comment.Via ConduitMay 7 2007, 12:33 PM

lcarsdata wrote:

I have tested with MediaWiki 1.5 through to trunk and can verify that it happens
in all versions of MediaWiki higher than or equal to 1.7 (including trunk) - see
http://www.wikitest.co.uk/1_6/Header_test,
http://www.wikitest.co.uk/1_7/Header_test and
http://www.wikitest.co.uk/SVN/Header_test

Add Comment