Commit 7dbacefd authored by catch's avatar catch

Issue #1991292 by swentel: Output of labels from hook_field_extra_fields()...

Issue #1991292 by swentel: Output of labels from hook_field_extra_fields() should not use check_plain().
parent c0d4ea28
......@@ -29,7 +29,8 @@
* 'display'). The keys are the name of the elements as appearing in the
* renderable array (either the entity form or the displayed entity). The
* value is an associative array:
* - label: The human readable name of the element.
* - label: The human readable name of the element. Make sure you sanitize
* this appropriately.
* - description: A short description of the element contents.
* - weight: The default weight of the element.
* - visible: (optional) The default visibility of the element. Defaults to
......@@ -49,7 +50,7 @@ function hook_field_extra_fields() {
foreach (node_type_get_types() as $bundle) {
if ($bundle->has_title) {
$extra['node'][$bundle->type]['form']['title'] = array(
'label' => $bundle->title_label,
'label' => check_plain($bundle->title_label),
'description' => $description,
'weight' => -5,
);
......
......@@ -403,7 +403,7 @@ protected function buildExtraFieldRow($field_id, $extra_field, $entity_display)
'#region_callback' => array($this, 'getRowRegion'),
'#js_settings' => array('rowHandler' => 'field'),
'human_name' => array(
'#markup' => check_plain($extra_field['label']),
'#markup' => $extra_field['label'],
),
'weight' => array(
'#type' => 'textfield',
......
......@@ -481,7 +481,7 @@ function node_field_extra_fields() {
foreach (node_type_get_types() as $bundle) {
if ($bundle->has_title) {
$extra['node'][$bundle->type]['form']['title'] = array(
'label' => $bundle->title_label,
'label' => check_plain($bundle->title_label),
'description' => $description,
'weight' => -5,
);
......
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