Commit 8e778911 authored by alexpott's avatar alexpott
Browse files

Revert "Issue #1798654 by swentel: Fixed Clean faulty HTML in help description of field widgets."

This reverts commit 0e59a8d6.
parent e99a83e5
......@@ -670,7 +670,7 @@ function field_cache_clear() {
* UTF-8.
*/
function field_filter_xss($string) {
return _filter_htmlcorrector(filter_xss($string, _field_filter_xss_allowed_tags()));
return filter_xss($string, _field_filter_xss_allowed_tags());
}
/**
......
......@@ -20,13 +20,13 @@ abstract class FieldUiTestBase extends WebTestBase {
*
* @var array
*/
public static $modules = array('node', 'field_ui', 'field_test', 'taxonomy', 'image');
public static $modules = array('node', 'field_ui', 'field_test', 'taxonomy');
function setUp() {
parent::setUp();
// Create test user.
$admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer node fields', 'administer node display', 'administer taxonomy', 'administer taxonomy_term fields', 'administer taxonomy_term display', 'administer users', 'administer user display', 'bypass node access'));
$admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer node fields', 'administer node display', 'administer taxonomy', 'administer taxonomy_term fields', 'administer taxonomy_term display', 'administer users', 'administer user display'));
$this->drupalLogin($admin_user);
// Create content type, with underscores.
......
......@@ -533,35 +533,4 @@ function testDeleteTaxonomyField() {
$this->assertNull(field_info_field($this->field_name), 'Field was deleted.');
}
/**
* Tests that help descriptions render valid HTML.
*/
function testHelpDescriptions() {
// Create an image field
entity_create('field_entity', array(
'field_name' => 'field_image',
'type' => 'image',
))->save();
entity_create('field_instance', array(
'field_name' => 'field_image',
'entity_type' => 'node',
'label' => 'Image',
'bundle' => 'article',
))->save();
$edit = array(
'instance[description]' => '<strong>Test with an upload field.',
);
$this->drupalPost('admin/structure/types/manage/article/fields/node.article.field_image', $edit, t('Save settings'));
$edit = array(
'instance[description]' => '<em>Test with a non upload field.',
);
$this->drupalPost('admin/structure/types/manage/article/fields/node.article.field_tags', $edit, t('Save settings'));
$this->drupalGet('node/add/article');
$this->assertRaw('<strong>Test with an upload field.</strong>');
$this->assertRaw('<em>Test with a non upload field.</em>');
}
}
......@@ -788,7 +788,7 @@ function theme_file_upload_help($variables) {
$descriptions = array();
if (strlen($description)) {
$descriptions[] = _filter_htmlcorrector($description);
$descriptions[] = $description;
}
if (isset($upload_validators['file_validate_size'])) {
$descriptions[] = t('Files must be less than !size.', array('!size' => '<strong>' . format_size($upload_validators['file_validate_size'][0]) . '</strong>'));
......
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