fix(client): invert action validation logic (#53213)

This commit is contained in:
Mama Naomi
2024-01-18 16:34:10 -08:00
committed by GitHub
parent 473babe180
commit 80ed98b73b
@@ -120,7 +120,7 @@ const createHeader = (id = mainPreviewId) => `
document.addEventListener('submit', function(e) {
const action = e.target.getAttribute('action');
e.preventDefault();
if (action || action.match(/https?:\\/\\//)) {
if (action && action.match(/https?:\\/\\//)) {
window.parent.window.alert(
i18nContent.t('misc.iframe-form-submit-alert', { externalLink: action })
)