http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84657

Revision: 84657
Author:   kaldari
Date:     2011-03-24 00:48:43 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
sanitize wikitext

Modified Paths:
--------------
    trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js

Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js   
2011-03-24 00:48:22 UTC (rev 84656)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js   
2011-03-24 00:48:43 UTC (rev 84657)
@@ -660,7 +660,6 @@
        
        /**
         * Convert entire details for this file into wikiText, which will then 
be posted to the file 
-        * XXX there is a WikiText sanitizer in use on UploadForm -- use that 
here, or port it 
         * @return wikitext representing all details
         */
        getWikiText: function() {
@@ -731,6 +730,10 @@
                // group categories together, maybe?
                wikiText += deed.getLicenseWikiText() + _this.div.find( 
'.categoryInput' ).get(0).getWikiText() + "\n\n";
                
+               // sanitize wikitext if TextCleaner is defined 
(MediaWiki:TextCleaner.js)
+               if ( typeof TextCleaner != 'undefined' && typeof 
TextCleaner.sanitizeWikiText == 'function' ) {
+                       wikiText = TextCleaner.sanitizeWikiText( wikiText, true 
);
+               }
 
                return wikiText;        
        },


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to