https://bugzilla.wikimedia.org/show_bug.cgi?id=35005
--- Comment #1 from T. Gries <[email protected]> --- implementation tip: see core/includes/Parser/Parser.php if ( !$text && $this->mOptions->getEnableImageWhitelist() && preg_match( self::EXT_IMAGE_REGEX, $url ) ) { $whitelist = explode( "\n", wfMessage( 'external_image_whitelist' )->inContentLanguage()->text() ); foreach ( $whitelist as $entry ) { # Sanitize the regex fragment, make it case-insensitive, ignore blank entries/comments if ( strpos( $entry, '#' ) === 0 || $entry === '' ) { continue; } if ( preg_match( '/' . str_replace( '/', '\\/', $entry ) . '/i', $url ) ) { # Image matches a whitelist entry $text = Linker::makeExternalImage( $url ); break; } } -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
