Used only once, small enough. Perfect candidate to not be exposed
even as a private function.
Change-Id: Ic020a596f709cb4f69c48ffe8138f9023a5c4062
# Stupid hack
$encValue = preg_replace_callback(
'/((?i)' . wfUrlProtocols() . ')/',
# Stupid hack
$encValue = preg_replace_callback(
'/((?i)' . wfUrlProtocols() . ')/',
- [ self::class, 'armorLinksCallback' ],
+ function ( $matches ) {
+ return str_replace( ':', ':', $matches[1] );
+ },
$encValue );
return $encValue;
}
$encValue );
return $encValue;
}
- /**
- * Regex replace callback for armoring links against further processing.
- * @param array $matches
- * @return string
- */
- private static function armorLinksCallback( $matches ) {
- return str_replace( ':', ':', $matches[1] );
- }
-
/**
* Return an associative array of attribute names and values from
* a partial tag string. Attribute names are forced to lowercase,
/**
* Return an associative array of attribute names and values from
* a partial tag string. Attribute names are forced to lowercase,