diff --git a/core/includes/form.inc b/core/includes/form.inc index c3a6835..7668546 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1334,7 +1334,7 @@ function drupal_redirect_form($form_state) { } } } - $url = url(Drupal::service('request')->getPathInfo(), array( + $url = url(ltrim(Drupal::service('request')->getPathInfo(), '/'), array( 'query' => Drupal::service('request')->query->all() )); drupal_set_redirect(new RedirectResponse($url)); diff --git a/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php index 60586d7..1488526 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php @@ -142,12 +142,19 @@ public function onIframeUpload(GetResponseForControllerResultEvent $event) { */ public function onHtml(GetResponseForControllerResultEvent $event) { $page_callback_result = $event->getControllerResult(); + // Handle early global redirects. + if ($redirect = drupal_set_redirect()) { + return $redirect; + } + $page = drupal_render_page($page_callback_result); + // Check for redirects that happened late, e.g. during forms built in + // preprocess functions. // Handle global redirects. if ($redirect = drupal_set_redirect()) { return $redirect; } - return new Response(drupal_render_page($page_callback_result)); - } + return new Response($page); + } /** * Registers the methods in this class that should be listeners. diff --git a/core/misc/form.js b/core/misc/form.js index d75de97..7999188 100644 --- a/core/misc/form.js +++ b/core/misc/form.js @@ -50,7 +50,7 @@ Drupal.behaviors.formUpdated = { $(context) // Since context could be an input element itself, it's added back to // the jQuery object and filtered again. - .find(':input').andSelf().filter(':input') + .find(':input').addBack().filter(':input') // To prevent duplicate events, the handlers are first removed and then // (re-)added. .unbind(events).bind(events, function () { diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js index cf29404..2a26841 100644 --- a/core/misc/tableselect.js +++ b/core/misc/tableselect.js @@ -21,7 +21,7 @@ Drupal.tableSelect = function () { var strings = { 'selectAll': Drupal.t('Select all rows in this table'), 'selectNone': Drupal.t('Deselect all rows in this table') }; var updateSelectAll = function (state) { // Update table's select-all checkbox (and sticky header's if available). - $table.prev('table.sticky-header').andSelf().find('th.select-all input[type="checkbox"]').each(function() { + $table.prev('table.sticky-header').addBack().find('th.select-all input[type="checkbox"]').each(function() { $(this).attr('title', state ? strings.selectNone : strings.selectAll); this.checked = state; }); diff --git a/core/modules/field/lib/Drupal/field/Tests/FormTest.php b/core/modules/field/lib/Drupal/field/Tests/FormTest.php index 2f5dbee..fcda223 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FormTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FormTest.php @@ -65,7 +65,7 @@ function testFieldFormSingle() { $this->drupalGet('test-entity/add/test_bundle'); // Create token value expected for description. - $token_description = check_plain(variable_get('site_name', 'Drupal')) . '_description'; + $token_description = check_plain(config('system.site')->get('name')) . '_description'; $this->assertText($token_description, 'Token replacement for description is displayed'); $this->assertFieldByName("{$this->field_name}[$langcode][0][value]", '', 'Widget is displayed'); $this->assertNoField("{$this->field_name}[$langcode][1][value]", 'No extraneous widget is displayed'); diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index dd36ce3..680d15e 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -421,45 +421,45 @@ div.messages { padding: 10px 10px 10px 50px; /* LTR */ } -div.status { +.messages.status { background-image: url(../../misc/message-24-ok.png); border-color: #be7; } -div.status, +.messages.status, .ok { color: #234600; } -div.status, +.messages.status, table tr.ok { background-color: #f8fff0; } -div.warning { +.messages.warning { background-image: url(../../misc/message-24-warning.png); border-color: #ed5; } -div.warning, +.messages.warning, .warning { color: #840; } -div.warning, +.messages.warning, table tr.warning { background-color: #fffce5; } -div.error { +.messages.error { background-image: url(../../misc/message-24-error.png); border-color: #ed541d; } -div.error, +.messages.error, .error { color: #8c2e0b; } -div.error, +.messages.error, table tr.error { background-color: #fef5f1; } -div.error p.error { +.messages.error p.error { color: #333; } diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php index f103abf..bd75e06 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php @@ -60,7 +60,7 @@ function testUserPasswordReset() { // Verify that the user was sent an e-mail. $this->assertMail('to', $this->account->mail, t('Password e-mail sent to user.')); - $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->name, '@site' => variable_get('site_name', 'Drupal'))); + $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->name, '@site' => config('system.site')->get('name'))); $this->assertMail('subject', $subject, 'Password reset e-mail subject is correct.'); $resetURL = $this->getResetURL(); @@ -73,7 +73,7 @@ function testUserPasswordReset() { // Check successful login. $this->drupalPost(NULL, NULL, t('Log in')); $this->assertLink(t('Log out')); - $this->assertTitle(t('@name | @site', array('@name' => $this->account->name, '@site' => variable_get('site_name', 'Drupal'))), 'Logged in using password reset link.'); + $this->assertTitle(t('@name | @site', array('@name' => $this->account->name, '@site' => config('system.site')->get('name'))), 'Logged in using password reset link.'); // Log out, and try to log in again using the same one-time link. $this->drupalLogout(); diff --git a/core/profiles/standard/config/editor.editor.basic_html.yml b/core/profiles/standard/config/editor.editor.basic_html.yml new file mode 100644 index 0000000..e66cc2e --- /dev/null +++ b/core/profiles/standard/config/editor.editor.basic_html.yml @@ -0,0 +1,24 @@ +format: basic_html +editor: ckeditor +settings: + toolbar: + buttons: + - + - Bold + - Italic + - '|' + - Link + - Unlink + - '|' + - BulletedList + - NumberedList + - '|' + - Blockquote + - Image + - '|' + - Source + plugins: + stylescombo: + styles: '' +status: '1' +langcode: und diff --git a/core/profiles/standard/config/filter.format.basic_html.yml b/core/profiles/standard/config/filter.format.basic_html.yml new file mode 100644 index 0000000..e97db8d --- /dev/null +++ b/core/profiles/standard/config/filter.format.basic_html.yml @@ -0,0 +1,21 @@ +format: basic_html +name: 'Basic HTML' +status: '1' +weight: '0' +roles: + - authenticated +cache: '1' +filters: + filter_html: + module: filter + status: '1' + settings: + allowed_html: '
    1. ' + filter_html_help: '0' + filter_htmlcorrector: + module: filter + status: '1' + filter_html_image_secure: + module: filter + status: '1' +langcode: und diff --git a/core/profiles/standard/config/filter.format.restricted_html.yml b/core/profiles/standard/config/filter.format.restricted_html.yml new file mode 100644 index 0000000..2e14ce2 --- /dev/null +++ b/core/profiles/standard/config/filter.format.restricted_html.yml @@ -0,0 +1,23 @@ +format: restricted_html +name: 'Restricted HTML' +status: '1' +weight: '0' +roles: + - anonymous +cache: '1' +filters: + filter_url: + module: filter + status: '1' + filter_html: + module: filter + status: '1' + setttings: + filter_html_nofollow: '1' + filter_autop: + module: filter + status: '1' + filter_htmlcorrector: + module: filter + status: '1' +langcode: en