Commit 1a8367ce authored by alexpott's avatar alexpott
Browse files

Issue #2305831 by aneek, Cottser, chx, jbrown: Fixed Double escaping on /admin/modules/uninstall.

parent 46f32ebf
......@@ -76,5 +76,6 @@ function testUninstallPage() {
}
$this->drupalPostForm(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
$this->assertNoRaw('<label', 'The page does not have double escaped HTML tags.');
}
}
......@@ -309,15 +309,30 @@ function theme_system_modules_uninstall($variables) {
'To uninstall @module, the following module must be uninstalled first: @required_modules',
'To uninstall @module, the following modules must be uninstalled first: @required_modules',
array('@module' => $form['modules'][$module]['#module_name'], '@required_modules' => implode(', ', $form['modules'][$module]['#required_by'])));
$disabled_message = '<div class="admin-requirements">' . $disabled_message . '</div>';
}
else {
$disabled_message = '';
}
$rows[] = array(
array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
'<label for="' . $form['uninstall'][$module]['#id'] . '" class="module-name table-filter-text-source">' . drupal_render($form['modules'][$module]['name']) . '</label>',
array('data' => drupal_render($form['modules'][$module]['description']) . $disabled_message, 'class' => array('description')),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => '<label for="{{ module_id }}" class="module-name table-filter-text-source">{{ module_name }}</label>',
'#context' => array('module_id' => $form['uninstall'][$module]['#id'], 'module_name' => drupal_render($form['modules'][$module]['name'])),
)
),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => '{{ module_description }} {% if disabled_message is not empty %} <div class="admin-requirements">{{ disabled_message }}</div> {% endif %}',
'#context' => array(
'module_description' => drupal_render($form['modules'][$module]['description']),
'disabled_message' => $disabled_message,
),
),
'class' => array('description'),
),
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment