Skip to content

Commit

Permalink
Updated drupal core.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmundra committed Nov 19, 2024
1 parent af52a41 commit e79de22
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 112 deletions.
210 changes: 105 additions & 105 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"symfony/process": "^7.1",
"symfony/polyfill-iconv": "^1.26",
"symfony/yaml": "^7.1",
"twig/twig": "^3.14.0",
"twig/twig": "^3.14.2",
"doctrine/annotations": "^2.0",
"doctrine/lexer": "^2.0",
"guzzlehttp/guzzle": "^7.5",
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Drupal {
/**
* The current system version.
*/
const VERSION = '11.0.6';
const VERSION = '11.0.7';

/**
* Core API compatibility.
Expand Down
5 changes: 3 additions & 2 deletions core/modules/views_ui/src/ViewEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Drupal\Core\Url;
use Drupal\views\Views;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
use Drupal\Core\Extension\ModuleHandlerInterface;
Expand Down Expand Up @@ -464,7 +465,7 @@ public function getDisplayDetails($view, $display) {

if ($path && (!str_contains($path, '%'))) {
// Wrap this in a try/catch as trying to generate links to some
// routes may throw a NotAcceptableHttpException if they do not
// routes may throw an exception, for example if they do not
// respond to HTML, such as RESTExports.
try {
if (!parse_url($path, PHP_URL_SCHEME)) {
Expand All @@ -476,7 +477,7 @@ public function getDisplayDetails($view, $display) {
$url = Url::fromUri("base:$path");
}
}
catch (NotAcceptableHttpException $e) {
catch (BadRequestException | NotAcceptableHttpException $e) {
$url = '/' . $path;
}

Expand Down
5 changes: 3 additions & 2 deletions core/modules/views_ui/src/ViewListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Drupal\Core\Link;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;

/**
Expand Down Expand Up @@ -261,14 +262,14 @@ protected function getDisplaysList(EntityInterface $view) {
$path = $display->getPath();
if ($view->status() && !str_contains($path, '%')) {
// Wrap this in a try/catch as trying to generate links to some
// routes may throw a NotAcceptableHttpException if they do not
// routes may throw an exception, for example if they do not
// respond to HTML, such as RESTExports.
try {
// @todo Views should expect and store a leading /. See:
// https://www.drupal.org/node/2423913
$rendered_path = Link::fromTextAndUrl('/' . $path, Url::fromUserInput('/' . $path))->toString();
}
catch (NotAcceptableHttpException $e) {
catch (BadRequestException | NotAcceptableHttpException $e) {
$rendered_path = '/' . $path;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ display:
display_plugin: page
position: 2
display_options:
path: foobar
path: 'foobar '
2 changes: 2 additions & 0 deletions core/modules/views_ui/tests/src/Functional/XssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public function testViewsUi(): void {
*/
public function testNoDoubleEscaping(): void {
$this->drupalGet('admin/structure/views');
$this->assertSession()->pageTextContains('sa_contrib_2013_035');
$this->assertSession()->pageTextContains('Page (/foobar )');
$this->assertSession()->assertNoEscaped('<');

$this->drupalGet('admin/structure/views/view/sa_contrib_2013_035');
Expand Down

0 comments on commit e79de22

Please sign in to comment.