summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Bergren2008-09-30 17:59:24 (GMT)
committer Brandon Bergren2008-09-30 17:59:24 (GMT)
commita6f3987d29ce2176c84b1cebfb38a28f643a0d0e (patch)
tree09010aaa0cd13094323db39b4c67e1c174965567
parent6f426d7f6675ff83ce77857fe6aea4bf9e52a22a (diff)
Fix minor issue with node type names. (This technically prevents XSS with content type names, but if you're giving out the ability to create / edit content types to people you don't trust, you have much bigger problems.)
-rw-r--r--gmap_location.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/gmap_location.module b/gmap_location.module
index e51c54e..27dcb72 100644
--- a/gmap_location.module
+++ b/gmap_location.module
@@ -519,7 +519,7 @@ function gmap_location_admin_settings() {
foreach ($ntypes as $key => $value) {
$form['node']['gmap_node_markers'][$key] = array(
'#type' => 'gmap_markerchooser',
- '#title' => t('Marker for '. $value->name),
+ '#title' => t('Marker for %type', array('%type' => $value->name)),
'#default_value' => isset($defaults[$key]) ? $defaults[$key] : 'drupal',
);
if (intval(variable_get('location_maxnum_'. $key, 0)) === 0) {
@@ -556,7 +556,7 @@ function gmap_location_block($op = 'list', $delta = 0, $edit = array()) {
if (variable_get('location_maxnum_'. $key, 0)) {
$form['gmap_location_block_macro_'. $key] = array(
'#type' => 'textfield',
- '#title' => t('Map Macro for '. $value->name),
+ '#title' => t('Map Macro for %type', array('%type' => $value->name)),
'#size' => 60,
'#maxlength' => 500,
'#default_value' => variable_get('gmap_location_block_macro_'. $key, ''),
@@ -577,7 +577,7 @@ function gmap_location_block($op = 'list', $delta = 0, $edit = array()) {
$form['gmap_location_author_block_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Enable author block for the following content types'),
- '#options' => node_get_types('names'),
+ '#options' => array_map('check_plain', node_get_types('names')),
'#default_value' => variable_get('gmap_location_author_block_types', array()),
);
}