From 47ea60a4c8b20b8d30922d1c7afd07894cb934fa Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Wed, 26 Jun 2024 13:31:17 +0100 Subject: [PATCH] Better alt handling --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 4af3ed3..0d58a34 100644 --- a/index.php +++ b/index.php @@ -731,7 +731,7 @@ HTML; if ( "image" == $mediaType ) { // Get the alt text - isset( $attachment["name"] ) ? $alt = $attachment["name"] : $alt = ""; + isset( $attachment["name"] ) ? $alt = htmlspecialchars( $attachment["name"] ) : $alt = ""; $content .= "{$alt}"; } else if ( "video" == $mediaType ) { $content .= "";