-
Bug
-
Resolution: Fixed
-
Minor
-
2.4, 2.9.4, 3.0.2, 3.1
-
MOODLE_24_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-37739-malformed-wiki-toc-links -
- Create wiki page with headings that use links (see example in the description)
- Make sure the TOC looks nice and all links work.
Create a wiki page with the following content:
<h1>[[Heading 1]]</h1> |
<h2>[[Heading A]]</h2> |
<h2>[[Heading B]]</h2> |
<h2>Heading D</h2> |
Save and return to the page.
Notice the table of contents the item for "Heading 1" appears as something like "%!0%!" and so on with others. "Heading D" appears correctly, however.
I've tried tracking this down myself in order to supply a patch but haven't been successful. It appears to have to do with how the toc content is generated after the parser has worked through the page content. By the time execution gets to wiki_markup_parser::generate_header() the $text parameter contains something like:
<a href="%!1%!">%!0%!</a> |
- has been marked as being related by
-
MDL-44962 Tags inside HTML wiki headers cause invalidsection error from edit link
- Closed
- is duplicated by
-
MDL-52783 Double square brackets in wiki ToC titles when header as link
- Closed
- will be (partly) resolved by
-
MDL-29585 Special characters in wiki section throw error
- Closed