r51087 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51086‎ | r51087 | r51088 >
Date:22:30, 27 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added Javascript-escaping of strings, fix for IE bug with FCK (hopefully)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc
@@ -70,13 +70,13 @@
7171 static function validationJavascript() {
7272 global $sfgJSValidationCalls;
7373
74 - $form_errors_header = wfMsg('sf_formerrors_header');
75 - $blank_error_str = wfMsg('sf_blank_error');
76 - $bad_url_error_str = wfMsg('sf_bad_url_error');
77 - $bad_email_error_str = wfMsg('sf_bad_email_error');
78 - $bad_number_error_str = wfMsg('sf_bad_number_error');
79 - $bad_integer_error_str = wfMsg('sf_bad_integer_error');
80 - $bad_date_error_str = wfMsg('sf_bad_date_error');
 74+ $form_errors_header = Xml::escapeJsString(wfMsg('sf_formerrors_header'));
 75+ $blank_error_str = Xml::escapeJsString(wfMsg('sf_blank_error'));
 76+ $bad_url_error_str = Xml::escapeJsString(wfMsg('sf_bad_url_error'));
 77+ $bad_email_error_str = Xml::escapeJsString(wfMsg('sf_bad_email_error'));
 78+ $bad_number_error_str = Xml::escapeJsString(wfMsg('sf_bad_number_error'));
 79+ $bad_integer_error_str = Xml::escapeJsString(wfMsg('sf_bad_integer_error'));
 80+ $bad_date_error_str = Xml::escapeJsString(wfMsg('sf_bad_date_error'));
8181
8282 $javascript_text =<<<END
8383
@@ -920,12 +920,12 @@
921921
922922 if (showFCKEditor & RTE_TOGGLE_LINK)
923923 {
924 - fckTools.innerHTML='[<a class="fckToogle" id="toggle_wpTextbox1" href="javascript:void(0)" onclick="ToggleFCKEditor(\'toggle\',\'free_text\')">'+ editorLink +'</a>] ';
 924+ fckTools.innerHTML='[<a class="fckToogle" id="toggle_free_text" href="javascript:void(0)" onclick="ToggleFCKEditor(\'toggle\',\'free_text\')">'+ editorLink +'</a>] ';
925925 }
926926 if (showFCKEditor & RTE_POPUP)
927927 {
928928 var style = (showFCKEditor & RTE_VISIBLE) ? 'style="display:none"' : "";
929 - fckTools.innerHTML+='<span ' + style + ' id="popup_wpTextbox1">[<a class="fckPopup" href="javascript:void(0)" onclick="ToggleFCKEditor(\'popup\',\'free_text\')">{$newWinMsg}</a>]</span>';
 929+ fckTools.innerHTML+='<span ' + style + ' id="popup_free_text">[<a class="fckPopup" href="javascript:void(0)" onclick="ToggleFCKEditor(\'popup\',\'free_text\')">{$newWinMsg}</a>]</span>';
930930 }
931931
932932 if (showFCKEditor & RTE_VISIBLE)
@@ -1028,7 +1028,7 @@
10291029 //FCKtoolbar.style.display = 'none';
10301030 oEditorIframe.style.display = '';
10311031 if ( !bIsWysiwyg ) oEditorIns.SwitchEditMode(); //switch to WYSIWYG
1032 - showFCKEditor += RTE_VISIBLE; // showFCKEditor+=RTE_VISIBLE
 1032+ showFCKEditor += RTE_VISIBLE;
10331033 if (oToggleLink) oToggleLink.innerHTML = editorMsgOff;
10341034 if (oPopupLink) oPopupLink.style.display = 'none';
10351035 }

Status & tagging log