Ticket #1015 (closed Bug: fixed)
Badly nested italic/bold markup can cause round-trip problems from MediaWiki markup to FCK and back to MediaWiki
| Reported by: | ais523 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Project : MediaWiki+FCKeditor | Version: | SVN |
| Keywords: | HasPatch | Cc: |
Description
The MediaWiki markup
a''b'''c''d'''e
changes to the markup
a''b'''c''''''''d'''e
when converted to FCK and back to MediaWiki markup (by changing to wikitext mode, entering the markup given as an example, then changing out of and back into wikitext mode); the second markup is incorrect, as it renders as normal a, italic b, bold italic c, three apostrophes, normal d, bold e, rather than normal a, italic b, bold italic c, bold d, notmal e. I suspect this is because the correct HTML for the example markup is
a<i>b<b>c</b></i><b>d</e>e
and the markup produced by substituting two apostrophes for each opening or closing i and three apostrophes for each opening or closing b produces the output that FCK gave; this is, however, incorrect, as the MediaWiki parser doesn't interpret more than five apostrophes in a row correctly. The wikimarkup produced by the editor should be equivalent to the original in such a case, either by detecting this and similar conditions to recreate the original, or by using HTML tags rather than apostrophes to prevent such a long string of consecutive apostrophes (for instance, one correct version of the markup is
a''b'''c'''''<b>d</b>e
, produced by using HTML rather than wikimarkup at the point where the sixth apostrophe would otherwise be created).