Ticket #2157 (new Bug)
editor strips off image comments containing wikitext
| Reported by: | feystorm | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Project : MediaWiki+FCKeditor | Version: | FCKeditor 2.5.1 |
| Keywords: | Confirmed | Cc: |
Description
If an image's comment contains wikitext, the comment gets stripped off completely when loaded into the editor.
Steps to reproduce: In 'wikitext' editing mode, create an image, and in its comment, put some wikitext such as a media link (example: [[Image:samplefile.png|thumb|right|300px|some caption [[Media:somefile.pdf|PDF version]]]]), and then save or preview the page (if saving, go back to edit again). When the page is re-loaded into the editor, the caption is completely blank.
On line 202 of FCKeditorSkin.body.php, if
if (isset($fp['alt']) && !empty($fp['alt']) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $fp['alt']) && $fp['alt'] != "Image:" . $orginal) {
is changed to
if (isset($fp['alt'])) {
, the caption will load, but with the wikitext stripped. So in the above case, the comment would become ("some captionPDF version"). This is better than no caption at all, but still not desired behavior.
Until the interface can be modified to allow WYSIWYG caption editing, it should put the raw wikitext into the caption.
I am using FCKeditor 2.5.1 with MediaWiki 1.12.0