return '';
}
- # If the target is just a fragment, with no title, we return the frag-
+ # If the target is just a fragment, with no title, we return the frag-
# ment text. Otherwise, we return the title text itself.
if ( $target->getPrefixedText() === '' and $target->getFragment() !== '' ) {
return htmlspecialchars( $target->getFragment() );
* caption HTML for image caption.
* link-url URL to link to
* link-title Title object to link to
+ * link-target Value for the target attribue, only with link-url
* no-link Boolean, suppress description link
*
* @param $handlerParams Array: associative array of media handler parameters, to be passed
$mtoParams = array();
if ( isset( $frameParams['link-url'] ) && $frameParams['link-url'] !== '' ) {
$mtoParams['custom-url-link'] = $frameParams['link-url'];
+ if ( isset( $frameParams['link-target'] ) ) {
+ $mtoParams['custom-target-link'] = $frameParams['link-target'];
+ }
} elseif ( isset( $frameParams['link-title'] ) && $frameParams['link-title'] !== '' ) {
- $mtoParams['custom-title-link'] = $frameParams['link-title'];
+ $mtoParams['custom-title-link'] = $this->normaliseSpecialPage( $frameParams['link-title'] );
} elseif ( !empty( $frameParams['no-link'] ) ) {
// No link
} else {