* Remove linkscc table code, no longer used.
* (bug 2271) Use faster text-only link replacement in image alt text
instead of rerunning expensive link lookup and HTML generation.
+* Only build the HTML attribute whitelist tree once.
+
=== Caveats ===
* @return array
*/
function attributeWhitelist( $element ) {
- $list = Sanitizer::setupAttributeWhitelist();
+ static $list;
+ if( !isset( $list ) ) {
+ $list = Sanitizer::setupAttributeWhitelist();
+ }
return isset( $list[$element] )
? $list[$element]
: array();