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 .= "
";
} else if ( "video" == $mediaType ) {
$content .= "";