Revert r33725, r33726 (hook in Sanitizer::fixTagAttributes()).
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 22 Apr 2008 17:29:41 +0000 (17:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 22 Apr 2008 17:29:41 +0000 (17:29 +0000)
This hook is just plain weird.
* Return value on abort destroys the entire data set
* Whitespace is bad
* It's very unclear what this would be used for
* This is a low-level function that's going to get called very often, and the hook is in a place that has little clear function. It's unclear what a general hook would want to do with it.

docs/hooks.txt
includes/Sanitizer.php

index 73f5a36..06de421 100644 (file)
@@ -919,12 +919,6 @@ $user: the User object to load preferences from
 'RevisionInsertComplete': called after a revision is inserted into the DB
 $revision: the Revision
 
-'SanitizerAfterFixTagAttributes': called after the sanitizer normalises tag attributes.
-$text: The original text which had the tag attributes fixed in it.
-$element: The name of the element in which tag attributes are being fixed
-&$attribs: A reference to an array of the source for the attributes to be added,
-       in the form "$encAttribute=\"$encValue\""
-
 'SavePreferences': called at the end of PreferencesForm::savePreferences; 
                    returning false prevents the preferences from being saved.
 $form: the PreferencesForm
index b7578ff..4f1e9e1 100644 (file)
@@ -716,10 +716,6 @@ class Sanitizer {
 
                        $attribs[] = "$encAttribute=\"$encValue\"";
                }
-               
-       if ( !wfRunHooks( 'SanitizerAfterFixTagAttributes', array( $text, $element, &$attribs ) ) ) {
-               return ''; # They want to abort this.
-       }
                return count( $attribs ) ? ' ' . implode( ' ', $attribs ) : '';
        }