Opened 17 years ago
Closed 16 years ago
#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 (FCKeditor) - Retired |
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).
Attachments (2)
Change History (5)
Changed 17 years ago by
Attachment: | fckplugin.js.patch added |
---|
comment:2 Changed 17 years ago by
Keywords: | HasPatch added |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
For some reasons, this patch didn't work when I tried the sample text you posted:
a''b'''c''d'''e
after applying patch, it still returned
a''b'''c''''''''d'''e
I've fixed this with [1823], it produces HTML tags when it is necessary, e.g.:
a''b'''c'''''<b>d</b>e
(ignore the previous commit: [1822], adding a space was rather a bad idea).
Possible patch to fix this issue