https://bugzilla.wikimedia.org/show_bug.cgi?id=25091

           Summary: String single quote unescaped in FCKeditor.body.php
                    prevents editor from loading.
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: Normal
         Component: FCKeditor
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: jmlapoi...@profweb.qc.ca


I installed MediaWiki 1.16.0 with latest FCKeditor from the 1.16.x branch and
it generate the following javascript error for my french language wiki.

Here is the error output of firefox's 3.6 linux x86_64 error console:

Erreur : missing ; before statement
Fichier Source :
http://wiki.demo.ep.profweb.qc.ca/index.php?title=Accueil&action=edit
Ligne : 274, Colonne : 41
Code Source :
  fckTools.innerHTML+='<span ' + style + ' id="popup_wpTextbox1">[<a
class="fckPopup" href="javascript:void(0)"
onclick="ToggleFCKEditor(\'popup\',\'wpTextbox1\')">Ouvrir l'éditeur enrichi
dans une nouvelle fenêtre</a>]</span>';

As you can see, the french text "Ouvrir l'éditeur enrichi dans une nouvelle
fenêtre" has a single quote wich is not escaped and this prvents the editor
from loading.

I found a temporary fix by doing the following thing:

In file "extensions/FCKeditor/FCKeditor.body.php", I replaced line 430:
  -> $newWinMsg = wfMsg( 'rich_editor_new_window' );
with
  -> $newWinMsg = str_replace("'","\'",wfMsg( 'rich_editor_new_window' ));

This fixed the problem, the editor now loads normaly.

I'm not a programmer so I don't know if this is a FCKeditor problem or a
MediaWiki problem and I'm not sure if I corrected this bug by doing the best
thing so I will let you guys decide where it should be fixed.

Thanx for your great work!

I hope you can fix this soon!

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to