Opened 12 years ago

Closed 12 years ago

#1021 closed Bug (fixed)

preformatted text gets an extra <br> when switching to wikitext

Reported by: Roalt Zijlstra Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version: SVN (FCKeditor) - Retired
Keywords: Cc: roalt@…

Description

Hey there,

I have searched on the Internet and I understand there are/were problems with Firefox and adding <br> into <pre> formatted text. I have a problem with this FCKeditor in Mediawiki 1.10.0. I did a manual install of the editor into mediawiki.

I can edit a page fine... but if I save it... the preformatted text includes <br> tags. This also happens if you switch to 'wikitext' mode.

You get the following: <pre>Bla A<br>Bla B<br>Bla C</pre><br>

When switching back to Normal mode, you still see the <br> and stuff. SO I think while converting it to Wiki textmode the preformatting breaks.

Tested with Firefox 2.0.0.6. In Internet Explorer 6 this does not happen at all, so it is a Firefox issue. FCKeditor 2.5 SVN build 16068

Hope this helps you..

Roalt

Change History (7)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: pre br firefox removed
Milestone: FCKeditor 2.5

I believe we'll be working on FCKeditor to fix it for version 2.5.

comment:2 Changed 12 years ago by Flavien

Tested with the latest source from SVN (at revision 954):

PRE is now working ok, with one exception that space before text is converted to tag.

Example to reproduce the problem:

  1. Start in Wikitext mode.
  1. Write a line with a space character and some text:
     Example
    
  1. Switch to FCKeditor mode.
  1. Switch back to Wikitext.
  1. Now the text is displayed as:
    <pre>Example
    </pre>
    

comment:3 Changed 12 years ago by Lane

I can confirm that there still is a problem with <br> tags showing up in <pre> sections with Firefox 2.0.0.7. This is using rev 960.

comment:4 Changed 12 years ago by Wiktor Walc

Flavien - please check the latest revision. To see the results, you need to patch one Mediawiki file (Parser.php). Instruction is in "FCKeditor integration guide".

laduncan - did you clear your browsers cache? What OS are you running, because I can't reproduce that bug with the latest revision.

comment:5 Changed 12 years ago by Lane

Could've been cache; in any event, it's working now. You all are doing an awful lot of work; thanks a ton!

comment:6 in reply to:  4 Changed 12 years ago by Flavien

Replying to wwalc:

Flavien - please check the latest revision. To see the results, you need to patch one Mediawiki file (Parser.php). Instruction is in "FCKeditor integration guide".

Thanks, that did it!

For reference, in MediaWiki 1.11.0, replace in Parser.php at around line 2202:

$output .= $this->closeParagraph().'<pre>';

by:

$output .= $this->closeParagraph().'<pre class="_fck_mw_lspace">';

comment:7 Changed 12 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

I'm happy that another issue is solved.

Thank you for your help!

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy