change logic for getting name and key values to match with default mobile image rendering logic

This commit is contained in:
Rafal Leszczynski 2015-05-19 17:00:28 +02:00 committed by rafal.kalinski
parent 9aeef8670e
commit a5e7fb7ae0

View file

@ -17,7 +17,8 @@ class NodeImage extends Node {
return [
'url' => $this->resolveImageUrl( $title ),
'name' => ( $title ) ? $title->getDBkey() : '',
'name' => ( $title ) ?htmlspecialchars( $title->getText() ) : '',
'key' => ( $title ) ? htmlspecialchars( urlencode( $title->getDBKey() ) ) : '',
'alt' => $alt,
'caption' => $caption,
'ref' => $ref