Analiza el siguiente codigo fuente en busca de posible errores. y dime como solucionar el problema con el caracter '&' en ella:

 <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>YouTube Video Thumbnail Downloader</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            margin-bottom: 20px;
        }

        h1 {
            margin-bottom: 20px;
        }

        nav {
            margin-bottom: 20px;
        }

        nav ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
        }

        nav li {
            margin: 0 10px;
        }

        nav a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
            font-size: 16px;
        }

        #logoContainer {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        #logo {
            max-width: 100%;
            height: auto;
            margin-right: 10px;
        }

        p {
            margin-bottom: 10px;
        }

        input[type="text"] {
            width: 100%;
            padding: 10px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 5px;
            margin-bottom: 10px;
        }

        button {
            display: block;
            margin: 0 auto;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        button:hover {
            background-color: #0056b3;
        }

        #adSpaceTop,
        #adSpaceMiddle,
        #adSpaceBottom {
            text-align: center;
            margin: 20px 0;
            /* Add any additional styling for your ad spaces here */
        }

        #thumbnailLinkAbove,
        #thumbnailLinkBelow {
            text-align: center;
            margin: 20px 0;
        }

        #thumbnailContainer img {
            max-width: 100%;
            display: block;
            margin: 20px 0;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
        }
    </style>
</head>
<body>
    <header>
        <!-- Logo and Menu Container -->
        <div id="logoContainer">
            <!-- Add your logo image here -->
            <img id="logo" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBysPlyhSK-c34z54Ca5GBTjjnBGQbI4_O5slFNlM_Y24nnAXBQwojevN9ScJwTklbZHlsZcMCAOFvYtMXo7YQZRAVLbzulCvWeSAQsgwgyWY5bnT6EAOGBTw3ugv7pzOleehLCZfHKL1E0LCV_0SweQrZMDnTJoHLy7cU2JNhqMbpjpzLaeslp34XlUw/s1600/Screenshot%202023-12-20%20at%205.31.38%20PM.png" alt="Youtube thumbnail Downloader">

            <!-- Navigation Menu -->
            <nav>
                <ul>
                    <li><a href="#home">Home</a></li>
                    <li><a href="#about">About</a></li>
                    <li><a href="https://youtube-thumbnail-downloaderzz.blogspot.com/p/privacy-policy.html">Privacy Policy</a></li>
                    <li><a href="#about">Contact</a></li>
                    <!-- Add more menu items as needed -->
                </ul>
            </nav>
        </div>

        <h1>YouTube Video Thumbnail Downloader</h1>
    </header>

    <!-- Ad Space: Insert your ad code for the top position here -->
    <div id="adSpaceTop">
        <!-- Insert your ad code here -->
        <p>This is an ad space. Insert your ad code here.</p>
    </div>

    <p>Download youtube and vimeo thumbnail images of all quality for free. This application let you download thumbnails of all quality. Just paste the URL of the thumbnail video in the below input and click Get Thumbnail Image. Enter a valid YouTube video URL below and click the "Show & Download Thumbnail" button:</p>
    <input type="text" id="videoUrl" placeholder="Enter YouTube video URL">
    <button onclick="showThumbnail()">Show & Download Thumbnail</button>
    <div id="thumbnailLinkAbove"></div>
    <div id="thumbnailContainer"></div>
    <div id="thumbnailLinkBelow"></div>

    <!-- Ad Space: Insert your ad code for the middle position here -->
    <div id="adSpaceMiddle">
        <!-- Insert your ad code here -->
        <p>This is an ad space. Insert your ad code here.</p>
    </div>
<h2>What is Youtube Thumbnail</h2>
 <p> Content
  Content
  Content</p>
  
    <!-- Ad Space: Insert your ad code for the bottom position here -->
    <div id="adSpaceBottom">
        <!-- Insert your ad code here -->
        <p>This is an ad space. Insert your ad code here.</p>
    </div>

    <script>
        function showThumbnail() {
            // Get the YouTube video URL
            const videoUrl = document.getElementById('videoUrl').value;

            // Regular expression to extract the video ID from the URL
            const regex = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
            const match = videoUrl.match(regex);

            if (match) {
                const videoId = match[1];
                const thumbnailUrl = `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`;

                // Display the thumbnail image
                const thumbnailContainer = document.getElementById('thumbnailContainer');
                thumbnailContainer.innerHTML = `<img src="${thumbnailUrl}" alt="Video Thumbnail">`;

                // Provide download links
                const thumbnailLinkAbove = document.getElementById('thumbnailLinkAbove');
                const thumbnailLinkBelow = document.getElementById('thumbnailLinkBelow');

                thumbnailLinkAbove.innerHTML = `<p><a href="${thumbnailUrl}" download>Download Thumbnail (Above)</a></p>`;
                thumbnailLinkBelow.innerHTML = `<p><a href="${thumbnailUrl}" download>Download Thumbnail (Below)</a></p>`;

            } else {
                alert('Invalid YouTube video URL. Please enter a valid URL.');
            }
        }
    </script>
</body>
</html>