Skip to content

Commit

Permalink
Sanitize names for HTML output, fixes #78
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-e committed Oct 25, 2017
1 parent c396584 commit 26edb13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fields/field.email_newsletter_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null)
$options[] = array(
$handle,
in_array($handle, explode(',', $templates)),
$about['name']
General::sanitize($about['name'])
);
}
}
Expand Down Expand Up @@ -89,7 +89,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null)
$options[] = array(
$sender['handle'],
in_array($sender['handle'], explode(',', $senders)),
$sender['name']
General::sanitize($sender['name'])
);
}
}
Expand All @@ -116,7 +116,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null)
$options[] = array(
$recipient_group['handle'],
in_array($recipient_group['handle'], (array) explode(',', $recipient_groups)),
$recipient_group['name']
General::sanitize($recipient_group['name'])
);
}
}
Expand Down Expand Up @@ -558,7 +558,7 @@ public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWit
$options[] = array(
$template[0],
$template[0] == $newsletter_properties['template'],
$template[1]
General::sanitize($template[1])
);
}
$gui->appendChild(
Expand All @@ -583,7 +583,7 @@ public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWit
$options[] = array(
$sender[0],
$sender[0] == $newsletter_properties['sender'],
$sender[1]
General::sanitize($sender[1])
);
}
$gui->appendChild(
Expand Down Expand Up @@ -615,7 +615,7 @@ public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWit
? array('checked' => 'checked')
: null
);
$label->setValue($input->generate() . $recipient_group[1]);
$label->setValue($input->generate() . General::sanitize($recipient_group[1]));
$label->setAttribute('class', 'recipient-group');
$p->appendChild($label);
}
Expand Down

0 comments on commit 26edb13

Please sign in to comment.