Wiki-page section edit link can point to incorrect section
|Assignee:||Jean-Philippe Lang||% Done:|
When headers in a wiki page are preceded by a line with one space (instead of an empty line), the section edit links edit the wrong section of the section of the page.
This is present in versions 1.4.1 and 2.0.2 of Redmine.
With the example content, four h1. sections are created.
The links point to the correct url (e.g. link to edit chapter 3 point to ?section=3)
The content shown in the edit page however, does not correctly respond to the section.
Clicking the edit link for Chapter 2 will edit Chapter 2 and 3.
Editing Chapter 3 will edit Chapter 4.
Headers may have to be separated by empty lines, but if an accidental space is present on such a line, it is not at all clear to the user why section editing does not work correctly.To reproduce:
- Create an wiki page with the content provided in the attachment
(Note the added space above the line 'h1. Chapter 3')
- Save page
- Click on the several section-edit icons