From 6a8177178b0429c7fb1af702a96eb90312fc51e5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 22 Apr 2008 17:29:41 +0000 Subject: [PATCH] Revert r33725, r33726 (hook in Sanitizer::fixTagAttributes()). 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 | 6 ------ includes/Sanitizer.php | 4 ---- 2 files changed, 10 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 73f5a36fa2..06de42193e 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index b7578ff53a..4f1e9e1f54 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -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 ) : ''; } -- 2.20.1