mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): invert action validation logic (#53213)
This commit is contained in:
@@ -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 })
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user