{"id":2,"date":"2025-10-14T15:41:40","date_gmt":"2025-10-14T15:41:40","guid":{"rendered":"https:\/\/andreaelsa.gagnaver.is\/?page_id=2"},"modified":"2025-11-12T12:10:10","modified_gmt":"2025-11-12T12:10:10","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/andreaelsa.gagnaver.is\/index.php\/sample-page\/","title":{"rendered":"Vertu me\u00f0 \u00ed rantinu"},"content":{"rendered":"\n<div id=\"mc_embed_shell\">\n      <link href=\"\/\/cdn-images.mailchimp.com\/embedcode\/classic-061523.css\" rel=\"stylesheet\" type=\"text\/css\">\n  <style type=\"text\/css\">\n        #mc_embed_signup{background:#fff; false;clear:left; font:14px Helvetica,Arial,sans-serif; width: 600px;}\n        \/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.\n           We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. *\/\n<\/style>\n<div id=\"mc_embed_signup\">\n    <form action=\"https:\/\/gmail.us3.list-manage.com\/subscribe\/post?u=3a7a7c603e064425003fb6a06&amp;id=b757ef1a5b&amp;f_id=00e5dfe3f0\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\">\n        <div id=\"mc_embed_signup_scroll\"><h2>Taktu pl\u00e1ss<\/h2>\n            <div class=\"indicates-required\"><span class=\"asterisk\">*<\/span> indicates required<\/div>\n            <div class=\"mc-field-group\"><label for=\"mce-EMAIL\">Netfang <span class=\"asterisk\">*<\/span><\/label><input type=\"email\" name=\"EMAIL\" class=\"required email\" id=\"mce-EMAIL\" required=\"\" value=\"\"><\/div><div class=\"mc-field-group\"><label for=\"mce-FNAME\">Fornafn <span class=\"asterisk\">*<\/span><\/label><input type=\"text\" name=\"FNAME\" class=\"required text\" id=\"mce-FNAME\" required=\"\" value=\"\"><\/div><div class=\"mc-field-group\"><label for=\"mce-LNAME\">Eftirnafn <span class=\"asterisk\">*<\/span><\/label><input type=\"text\" name=\"LNAME\" class=\"required text\" id=\"mce-LNAME\" required=\"\" value=\"\"><\/div><div class=\"mc-field-group\"><label for=\"mce-PHONE\">S\u00edman\u00famer <\/label><input type=\"text\" name=\"PHONE\" class=\"REQ_CSS\" id=\"mce-PHONE\" value=\"\"><\/div><div class=\"mc-field-group size1of2\"><label for=\"mce-BIRTHDAY-month\">Afm\u00e6lisdagur <span class=\"asterisk\">*<\/span><\/label><div class=\"datefield\"><span class=\"subfield dayfield\"><input class=\"birthday REQ_CSS\" type=\"text\" pattern=\"[0-9]*\" placeholder=\"DD\" size=\"2\" maxlength=\"2\" name=\"BIRTHDAY[day]\" id=\"mce-BIRTHDAY-day\" value=\"\"><\/span> \/<span class=\"subfield monthfield\"><input class=\"birthday REQ_CSS\" type=\"text\" pattern=\"[0-9]*\" placeholder=\"MM\" size=\"2\" maxlength=\"2\" name=\"BIRTHDAY[month]\" id=\"mce-BIRTHDAY-month\" value=\"\"><\/span><span class=\"small-meta nowrap\">( dd \/ mm )<\/span><\/div><\/div><div class=\"mc-field-group\"><label for=\"mce-ORKARO\">Hvort ertu a\u00f0 leita eftir <span class=\"asterisk\">*<\/span><\/label><select name=\"ORKARO\" class=\"required\" id=\"mce-ORKARO\"><option value=\"\"><\/option><option value=\"R\u00f3\">R\u00f3<\/option><option value=\"Orku\">Orku<\/option><option value=\"R\u00f3 og orku\">R\u00f3 og orku<\/option><\/select><\/div>\n        <div id=\"mce-responses\" class=\"clear foot\">\n            <div class=\"response\" id=\"mce-error-response\" style=\"display: none;\"><\/div>\n            <div class=\"response\" id=\"mce-success-response\" style=\"display: none;\"><\/div>\n        <\/div>\n    <div aria-hidden=\"true\" style=\"position: absolute; left: -5000px;\">\n        \/* real people should not fill this in and expect good things &#8211; do not remove this or risk form bot signups *\/\n        <input type=\"text\" name=\"b_3a7a7c603e064425003fb6a06_b757ef1a5b\" tabindex=\"-1\" value=\"\">\n    <\/div>\n        <div class=\"optionalParent\">\n            <div class=\"clear foot\">\n                <input type=\"submit\" name=\"subscribe\" id=\"mc-embedded-subscribe\" class=\"button\" value=\"Subscribe\">\n                <p style=\"margin: 0px auto;\"><a href=\"http:\/\/eepurl.com\/jpgveE\" title=\"Mailchimp - email marketing made easy and fun\"><span style=\"display: inline-block; background-color: transparent; border-radius: 4px;\"><img decoding=\"async\" class=\"refferal_badge\" src=\"https:\/\/digitalasset.intuit.com\/render\/content\/dam\/intuit\/mc-fe\/en_us\/images\/intuit-mc-rewards-text-dark.svg\" alt=\"Intuit Mailchimp\" style=\"width: 220px; height: 40px; display: flex; padding: 2px 0px; justify-content: center; align-items: center;\"><\/span><\/a><\/p>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/form>\n<\/div>\n<script type=\"text\/javascript\" src=\"\/\/s3.amazonaws.com\/downloads.mailchimp.com\/js\/mc-validate.js\"><\/script><script type=\"text\/javascript\">(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[4]='PHONE';ftypes[4]='phone';fnames[5]='BIRTHDAY';ftypes[5]='birthday';fnames[7]='ORKARO';ftypes[7]='dropdown';fnames[3]='ADDRESS';ftypes[3]='address';fnames[8]='SPORT';ftypes[8]='dropdown';fnames[6]='PULSA';ftypes[6]='dropdown';}(jQuery));var $mcj = jQuery.noConflict(true);\n    \/\/ SMS Phone Multi-Country Functionality\n    if(!window.MC) {\n      window.MC = {};\n    }\n    window.MC.smsPhoneData = {\n      defaultCountryCode: 'IS',\n      programs: [],\n      smsProgramDataCountryNames: []\n    };\n\n    function getCountryUnicodeFlag(countryCode) {\n       return countryCode.toUpperCase().replace(\/.\/g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))\n    };\n\n    \/\/ HTML sanitization function to prevent XSS\n    function sanitizeHtml(str) {\n      if (typeof str !== 'string') return '';\n      return str\n        .replace(\/&\/g, '&amp;')\n        .replace(\/<\/g, '&lt;')\n        .replace(\/>\/g, '&gt;')\n        .replace(\/\"\/g, '&quot;')\n        .replace(\/'\/g, '&#x27;')\n        .replace(\/\\\/\/g, '&#x2F;');\n    }\n\n    \/\/ URL sanitization function to prevent javascript: and data: URLs\n    function sanitizeUrl(url) {\n      if (typeof url !== 'string') return '';\n      const trimmedUrl = url.trim().toLowerCase();\n      if (trimmedUrl.startsWith('javascript:') || trimmedUrl.startsWith('data:') || trimmedUrl.startsWith('vbscript:')) {\n        return '#';\n      }\n      return url;\n    }\n\n    const getBrowserLanguage = () => {\n      if (!window?.navigator?.language?.split('-')[1]) {\n        return window?.navigator?.language?.toUpperCase();\n      }\n      return window?.navigator?.language?.split('-')[1];\n    };\n\n    function getDefaultCountryProgram(defaultCountryCode, smsProgramData) {\n      if (!smsProgramData || smsProgramData.length === 0) {\n        return null;\n      }\n\n      const browserLanguage = getBrowserLanguage();\n\n      if (browserLanguage) {\n        const foundProgram = smsProgramData.find(\n          (program) => program?.countryCode === browserLanguage,\n        );\n        if (foundProgram) {\n          return foundProgram;\n        }\n      }\n\n      if (defaultCountryCode) {\n        const foundProgram = smsProgramData.find(\n          (program) => program?.countryCode === defaultCountryCode,\n        );\n        if (foundProgram) {\n          return foundProgram;\n        }\n      }\n\n      return smsProgramData[0];\n    }\n\n    function updateSmsLegalText(countryCode, fieldName) {\n      if (!countryCode || !fieldName) {\n        return;\n      }\n      \n      const programs = window?.MC?.smsPhoneData?.programs;\n      if (!programs || !Array.isArray(programs)) {\n        return;\n      }\n      \n      const program = programs.find(program => program?.countryCode === countryCode);\n      if (!program || !program.requiredTemplate) {\n        return;\n      }\n      \n      const legalTextElement = document.querySelector('#legal-text-' + fieldName);\n      if (!legalTextElement) {\n        return;\n      }\n      \n      \/\/ Remove HTML tags and clean up the text\n      const divRegex = new RegExp('<\/?[div][^>]*>', 'gi');\n      const fullAnchorRegex = new RegExp('<a.*?<\/a>', 'g');\n      const anchorRegex = new RegExp('<a href=\"(.*?)\" target=\"(.*?)\">(.*?)<\/a>');\n      \n      const requiredLegalText = program.requiredTemplate\n        .replace(divRegex, '')\n        .replace(fullAnchorRegex, '')\n        .slice(0, -1);\n      \n      const anchorMatches = program.requiredTemplate.match(anchorRegex);\n      \n      if (anchorMatches && anchorMatches.length >= 4) {\n        \/\/ Create link element safely using DOM methods instead of innerHTML\n        const linkElement = document.createElement('a');\n        linkElement.href = sanitizeUrl(anchorMatches[1]);\n        linkElement.target = sanitizeHtml(anchorMatches[2]);\n        linkElement.textContent = sanitizeHtml(anchorMatches[3]);\n        \n        legalTextElement.textContent = requiredLegalText + ' ';\n        legalTextElement.appendChild(linkElement);\n        legalTextElement.appendChild(document.createTextNode('.'));\n      } else {\n        legalTextElement.textContent = requiredLegalText + '.';\n      }\n    }\n\n    function generateDropdownOptions(smsProgramData) {\n      if (!smsProgramData || smsProgramData.length === 0) {\n        return '';\n      }\n      \n      return smsProgramData.map(program => {\n        const flag = getCountryUnicodeFlag(program.countryCode);\n        const countryName = getCountryName(program.countryCode);\n        const callingCode = program.countryCallingCode || '';\n        \/\/ Sanitize all values to prevent XSS\n        const sanitizedCountryCode = sanitizeHtml(program.countryCode || '');\n        const sanitizedCountryName = sanitizeHtml(countryName || '');\n        const sanitizedCallingCode = sanitizeHtml(callingCode || '');\n        return '<option value=\"' + sanitizedCountryCode + '\">' + sanitizedCountryName + ' ' + sanitizedCallingCode + '<\/option>';\n      }).join('');\n    }\n\n    function getCountryName(countryCode) {\n      if (window.MC?.smsPhoneData?.smsProgramDataCountryNames && Array.isArray(window.MC.smsPhoneData.smsProgramDataCountryNames)) {\n        for (let i = 0; i < window.MC.smsPhoneData.smsProgramDataCountryNames.length; i++) {\n          if (window.MC.smsPhoneData.smsProgramDataCountryNames[i].code === countryCode) {\n            return window.MC.smsPhoneData.smsProgramDataCountryNames[i].name;\n          }\n        }\n      }\n      return countryCode;\n    }\n\n    function getDefaultPlaceholder(countryCode) {\n      if (!countryCode || typeof countryCode !== 'string') {\n        return '+1 000 000 0000'; \/\/ Default US placeholder\n      }\n      \n      const mockPlaceholders = [\n        {\n      countryCode: 'US',\n      placeholder: '+1 000 000 0000',\n      helpText: 'Include the US country code +1 before the phone number',\n    },\n    {\n      countryCode: 'GB',\n      placeholder: '+44 0000 000000',\n      helpText: 'Include the GB country code +44 before the phone number',\n    },\n    {\n      countryCode: 'CA',\n      placeholder: '+1 000 000 0000',\n      helpText: 'Include the CA country code +1 before the phone number',\n    },\n    {\n      countryCode: 'AU',\n      placeholder: '+61 000 000 000',\n      helpText: 'Include the AU country code +61 before the phone number',\n    },\n    {\n      countryCode: 'DE',\n      placeholder: '+49 000 0000000',\n      helpText: 'F\u00fcgen Sie vor der Telefonnummer die DE-L\u00e4ndervorwahl +49 ein',\n    },\n    {\n      countryCode: 'FR',\n      placeholder: '+33 0 00 00 00 00',\n      helpText: 'Incluez le code pays FR +33 avant le num\u00e9ro de t\u00e9l\u00e9phone',\n    },\n    {\n      countryCode: 'ES',\n      placeholder: '+34 000 000 000',\n      helpText: 'Incluya el c\u00f3digo de pa\u00eds ES +34 antes del n\u00famero de tel\u00e9fono',\n    },\n    {\n      countryCode: 'NL',\n      placeholder: '+31 0 00000000',\n      helpText: 'Voeg de NL-landcode +31 toe v\u00f3\u00f3r het telefoonnummer',\n    },\n    {\n      countryCode: 'BE',\n      placeholder: '+32 000 00 00 00',\n      helpText: 'Incluez le code pays BE +32 avant le num\u00e9ro de t\u00e9l\u00e9phone',\n    },\n    {\n      countryCode: 'CH',\n      placeholder: '+41 00 000 00 00',\n      helpText: 'F\u00fcgen Sie vor der Telefonnummer die CH-L\u00e4ndervorwahl +41 ein',\n    },\n    {\n      countryCode: 'AT',\n      placeholder: '+43 000 000 0000',\n      helpText: 'F\u00fcgen Sie vor der Telefonnummer die AT-L\u00e4ndervorwahl +43 ein',\n    },\n    {\n      countryCode: 'IE',\n      placeholder: '+353 00 000 0000',\n      helpText: 'Include the IE country code +353 before the phone number',\n    },\n    {\n      countryCode: 'IT',\n      placeholder: '+39 000 000 0000',\n      helpText:\n        'Includere il prefisso internazionale IT +39 prima del numero di telefono',\n    },\n      ];\n\n      const selectedPlaceholder = mockPlaceholders.find(function(item) {\n        return item &#038;&#038; item.countryCode === countryCode;\n      });\n      \n      return selectedPlaceholder ? selectedPlaceholder.placeholder : mockPlaceholders[0].placeholder;\n    }\n\n    function updatePlaceholder(countryCode, fieldName) {\n      if (!countryCode || !fieldName) {\n        return;\n      }\n      \n      const phoneInput = document.querySelector('#mce-' + fieldName);\n      if (!phoneInput) {\n        return;\n      }\n      \n      const placeholder = getDefaultPlaceholder(countryCode);\n      if (placeholder) {\n        phoneInput.placeholder = placeholder;\n      }\n    }\n\n    function updateCountryCodeInstruction(countryCode, fieldName) {\n      updatePlaceholder(countryCode, fieldName);\n      \n    }\n\n    function getDefaultHelpText(countryCode) {\n      const mockPlaceholders = [\n        {\n          countryCode: 'US',\n          placeholder: '+1 000 000 0000',\n          helpText: 'Include the US country code +1 before the phone number',\n        },\n        {\n          countryCode: 'GB',\n          placeholder: '+44 0000 000000',\n          helpText: 'Include the GB country code +44 before the phone number',\n        },\n        {\n          countryCode: 'CA',\n          placeholder: '+1 000 000 0000',\n          helpText: 'Include the CA country code +1 before the phone number',\n        },\n        {\n          countryCode: 'AU',\n          placeholder: '+61 000 000 000',\n          helpText: 'Include the AU country code +61 before the phone number',\n        },\n        {\n          countryCode: 'DE',\n          placeholder: '+49 000 0000000',\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die DE-L\u00e4ndervorwahl +49 ein',\n        },\n        {\n          countryCode: 'FR',\n          placeholder: '+33 0 00 00 00 00',\n          helpText: 'Incluez le code pays FR +33 avant le num\u00e9ro de t\u00e9l\u00e9phone',\n        },\n        {\n          countryCode: 'ES',\n          placeholder: '+34 000 000 000',\n          helpText: 'Incluya el c\u00f3digo de pa\u00eds ES +34 antes del n\u00famero de tel\u00e9fono',\n        },\n        {\n          countryCode: 'NL',\n          placeholder: '+31 0 00000000',\n          helpText: 'Voeg de NL-landcode +31 toe v\u00f3\u00f3r het telefoonnummer',\n        },\n        {\n          countryCode: 'BE',\n          placeholder: '+32 000 00 00 00',\n          helpText: 'Incluez le code pays BE +32 avant le num\u00e9ro de t\u00e9l\u00e9phone',\n        },\n        {\n          countryCode: 'CH',\n          placeholder: '+41 00 000 00 00',\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die CH-L\u00e4ndervorwahl +41 ein',\n        },\n        {\n          countryCode: 'AT',\n          placeholder: '+43 000 000 0000',\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die AT-L\u00e4ndervorwahl +43 ein',\n        },\n        {\n          countryCode: 'IE',\n          placeholder: '+353 00 000 0000',\n          helpText: 'Include the IE country code +353 before the phone number',\n        },\n        {\n          countryCode: 'IT',\n          placeholder: '+39 000 000 0000',\n          helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono',\n        },\n      ];\n      \n      if (!countryCode || typeof countryCode !== 'string') {\n        return mockPlaceholders[0].helpText;\n      }\n      \n      const selectedHelpText = mockPlaceholders.find(function(item) {\n          return item &#038;&#038; item.countryCode === countryCode;\n        });\n        \n        return selectedHelpText ? selectedHelpText.helpText : mockPlaceholders[0].helpText;\n    }\n\n    function setDefaultHelpText(countryCode) {\n      const helpTextSpan = document.querySelector('#help-text');\n      if (!helpTextSpan) {\n        return;\n      }\n\n        \n    }\n\n    function updateHelpTextCountryCode(countryCode, fieldName) {\n      if (!countryCode || !fieldName) {\n        return;\n      }\n      \n      setDefaultHelpText(countryCode);\n    }\n\n    function initializeSmsPhoneDropdown(fieldName) {\n      if (!fieldName || typeof fieldName !== 'string') {\n        return;\n      }\n      \n      const dropdown = document.querySelector('#country-select-' + fieldName);\n      const displayFlag = document.querySelector('#flag-display-' + fieldName);\n      \n      if (!dropdown || !displayFlag) {\n        return;\n      }\n\n      const smsPhoneData = window.MC?.smsPhoneData;\n      if (smsPhoneData &#038;&#038; smsPhoneData.programs &#038;&#038; Array.isArray(smsPhoneData.programs)) {\n        dropdown.innerHTML = generateDropdownOptions(smsPhoneData.programs);\n      }\n\n      const defaultProgram = getDefaultCountryProgram(smsPhoneData?.defaultCountryCode, smsPhoneData?.programs);\n      if (defaultProgram &#038;&#038; defaultProgram.countryCode) {\n        dropdown.value = defaultProgram.countryCode;\n        \n        const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName);\n        if (flagSpan) {\n          flagSpan.textContent = getCountryUnicodeFlag(defaultProgram.countryCode);\n          flagSpan.setAttribute('aria-label', sanitizeHtml(defaultProgram.countryCode) + ' flag');\n        }\n        \n        updateSmsLegalText(defaultProgram.countryCode, fieldName);\n        updatePlaceholder(defaultProgram.countryCode, fieldName);\n        updateCountryCodeInstruction(defaultProgram.countryCode, fieldName);\n      }\n\n     \n      var phoneInput = document.querySelector('#mce-' + fieldName);\n      if (phoneInput &#038;&#038; defaultProgram.countryCallingCode) {\n        phoneInput.value = defaultProgram.countryCallingCode;\n      }\n      \n\n\n      displayFlag?.addEventListener('click', function(e) {\n        dropdown.focus();\n      });\n\n\n      dropdown?.addEventListener('change', function() {\n        const selectedCountry = this.value;\n        \n        if (!selectedCountry || typeof selectedCountry !== 'string') {\n          return;\n        }\n        \n        const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName);\n        if (flagSpan) {\n          flagSpan.textContent = getCountryUnicodeFlag(selectedCountry);\n          flagSpan.setAttribute('aria-label', sanitizeHtml(selectedCountry) + ' flag');\n        }\n\n         \n        const selectedProgram = window.MC?.smsPhoneData?.programs.find(function(program) {\n          return program &#038;&#038; program.countryCode === selectedCountry;\n        });\n        var phoneInput = document.querySelector('#mce-' + fieldName);\n        if (phoneInput &#038;&#038; selectedProgram.countryCallingCode) {\n          phoneInput.value = selectedProgram.countryCallingCode;\n        }\n        \n        \n        updateSmsLegalText(selectedCountry, fieldName);\n        updatePlaceholder(selectedCountry, fieldName);\n        updateCountryCodeInstruction(selectedCountry, fieldName);\n      });\n    }\n\n    document.addEventListener('DOMContentLoaded', function() {\n      const smsPhoneFields = document.querySelectorAll('[id^=\"country-select-\"]');\n      \n      smsPhoneFields.forEach(function(dropdown) {\n        const fieldName = dropdown?.id.replace('country-select-', '');\n        initializeSmsPhoneDropdown(fieldName);\n      });\n    });\n    <\/script><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Taktu pl\u00e1ss * indicates required Netfang * Fornafn * Eftirnafn * S\u00edman\u00famer Afm\u00e6lisdagur * \/( dd \/ mm ) Hvort ertu a\u00f0 leita eftir *R\u00f3OrkuR\u00f3 og orku \/* real people should not fill this in and expect good things &#8211; do not remove this or risk form bot signups *\/<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":5,"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/andreaelsa.gagnaver.is\/index.php\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}