diff --git a/core/includes/form.inc b/core/includes/form.inc
index 29bce00..f97e7da
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -4541,7 +4541,7 @@ function theme_form_element_label($variables) {
   }
 
   // If the element is required, a required marker is appended to the label.
-  $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';
+  $required = !empty($element['#required']) ? ' ' . theme('form_required_marker', array('element' => $element)) : '';
 
   $title = filter_xss_admin($element['#title']);
 
@@ -4560,8 +4560,8 @@ function theme_form_element_label($variables) {
   }
 
   // The leading whitespace helps visually separate fields from inline labels.
-  return ' <label' . new Attribute($attributes) . '>' . $t('!title !required', array('!title' => $title, '!required' => $required)) . "</label>\n";
-}
+  return '<label' . drupal_attributes($attributes) . '>' . $t('!title!required', array('!title' => $title, '!required' => $required)) . "</label>\n";
+  }
 
 /**
  * Sets a form element's class attribute.
diff --git a/core/misc/collapse.js b/core/misc/collapse.js
old mode 100644
new mode 100755
diff --git a/core/modules/block/block.js b/core/modules/block/block.js
index 96ce310..7a7c23b 100644
--- a/core/modules/block/block.js
+++ b/core/modules/block/block.js
@@ -23,7 +23,7 @@ Drupal.behaviors.blockSettingsSummary = {
       if (!vals.length) {
         vals.push(Drupal.t('Not restricted'));
       }
-      return $.map(vals, $.trim).join(', ');
+      return vals.join(', ');
     }
 
     $('#edit-node-type').drupalSetSummary(checkboxesSummary);
diff --git a/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php b/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php
index dbf7203..dd07abc 100644
--- a/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php
+++ b/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php
@@ -500,12 +500,12 @@ class OptionsWidgetsTest extends FieldTestBase {
     $this->drupalGet($fieldEditUrl);
 
     $this->assertText(
-      'Use field label instead of the "On value" as label ',
+      'Use field label instead of the "On value" as label',
       t('Display setting checkbox available.')
     );
 
     $this->assertFieldByXPath(
-      '*//label[@for="edit-' . $this->bool['field_name'] . '-und" and text()="MyOnValue "]',
+      '*//label[@for="edit-' . $this->bool['field_name'] . '-und" and text()="MyOnValue"]',
       TRUE,
       t('Default case shows "On value"')
     );
@@ -519,7 +519,7 @@ class OptionsWidgetsTest extends FieldTestBase {
     // is stored and has the expected effect
     $this->drupalGet($fieldEditUrl);
     $this->assertText(
-      'Use field label instead of the "On value" as label ',
+      'Use field label instead of the "On value" as label',
       t('Display setting checkbox is available')
     );
     $this->assertFieldChecked(
@@ -527,7 +527,7 @@ class OptionsWidgetsTest extends FieldTestBase {
       t('Display settings checkbox checked')
     );
     $this->assertFieldByXPath(
-      '*//label[@for="edit-' . $this->bool['field_name'] . '-und" and text()="' . $this->bool['field_name'] . ' "]',
+      '*//label[@for="edit-' . $this->bool['field_name'] . '-und" and text()="' . $this->bool['field_name'] . '"]',
       TRUE,
       t('Display label changes label of the checkbox')
     );
diff --git a/core/modules/field/modules/text/text.js b/core/modules/field/modules/text/text.js
index efc5579..2f8552e 100644
--- a/core/modules/field/modules/text/text.js
+++ b/core/modules/field/modules/text/text.js
@@ -39,6 +39,9 @@ Drupal.behaviors.textSummary = {
         }
       ).appendTo($summaryLabel);
 
+      // Add space before the link.
+      $link.prepend(' ');
+
       // If no summary is set, hide the summary field.
       if ($widget.find('.text-summary').val() === '') {
         $link.click();
