r100891 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100890‎ | r100891 | r100892 >
Date:22:27, 26 October 2011
Author:kaldari
Status:ok
Tags:fundraising 
Comment:
fixing escaping in js, follow-up to r100886
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
@@ -64,29 +64,29 @@
6565 for( i = 0; i < numFields; i++ ) {
6666 if( document.getElementById( fields[i] ).value == '' ) {
6767 currField = mw.msg( 'donate_interface-error-msg-' + fields[i] );
68 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + currField + '.\r\n';
 68+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + currField + '.\\r\\n';
6969 }
7070 }
7171
7272 if (document.getElementById('fname').value == '$first') {
73 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' first name.\r\n';
 73+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' first name.\\r\\n';
7474 }
7575 if (document.getElementById('lname').value == '$last') {
76 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' last name.\r\n';
 76+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' last name.\\r\\n';
7777 }
7878 if (document.getElementById('street').value == '$street') {
79 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' street address.\r\n';
 79+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' street address.\\r\\n';
8080 }
8181 if (document.getElementById('city').value == '$city') {
82 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' city.\r\n';
 82+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' city.\\r\\n';
8383 }
8484 if (document.getElementById('zip').value == '$zip') {
85 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' zip code.\r\n';
 85+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' zip code.\\r\\n';
8686 }
8787
8888 var stateField = document.getElementById( 'state' );
8989 if( stateField.options[stateField.selectedIndex].value == '' ) {
90 - output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + mw.msg( 'donate_interface-error-msg-state' ) + '.\r\n';
 90+ output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + mw.msg( 'donate_interface-error-msg-state' ) + '.\\r\\n';
9191 }
9292
9393 // validate email address

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100886fixing form validation broken by message migrationkaldari22:13, 26 October 2011

Status & tagging log