diff --git a/services/Parser/Nodes/NodeImage.php b/services/Parser/Nodes/NodeImage.php index 4461ed0..3aef8cf 100644 --- a/services/Parser/Nodes/NodeImage.php +++ b/services/Parser/Nodes/NodeImage.php @@ -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