26 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!1101Issue #2412669 by claudiu.cristea, Julfabre, sidharrell, catch, daffie,...,!1039Issue #2556069 by claudiu.cristea, bnjmnm, lauriii, pfrenssen, Tim Bozeman,...,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!1012Issue #3226887: Hreflang on non-canonical content pages,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!825Issue #3211838 by mondrake, longwave: Convert assertions involving use of...,!795Issue #3212005 by guilhermevp, tedbow, phenaproxima: Add @throws docs to...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!748#1091852 Display Bug when using #states (Forms API) with Ajax Request,!731Add a new recipe to Umami demo - Chicken souvlaki and couscous,!730Issue #3211810 by alexpott, xjm, Spokje, Amber Himes Matz, Kristen Pol,...,!700Issue #3185165 by Spokje, vipin.mittal18, Suresh Prabhu Parkala, lauriii,...,!594Put each entity type table into a details element on admin/config/regional/content-language,!592Issue #2957953: Editing menus user-experience has regressed,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!429[regression] Pages Manage Fields, Manage form, Manage display should include name of content type or entity,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!43Resolve #3173180: Add UI for 'loading' html attribute to images,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
$this->assertStringContainsString($encoded_path,$link,newFormattableMarkup('XSS attack @path was filtered by \Drupal\Core\Utility\LinkGeneratorInterface::generate().',['@path'=>$path]));
$this->assertStringNotContainsString($path,$link,newFormattableMarkup('XSS attack @path was filtered by \Drupal\Core\Utility\LinkGeneratorInterface::generate().',['@path'=>$path]));
// Test \Drupal\Core\Url.
$link=Url::fromUri('base:'.$path)->toString();
$this->assertStringContainsString($encoded_path,$link,newFormattableMarkup('XSS attack @path was filtered by #theme',['@path'=>$path]));
$this->assertStringNotContainsString($path,$link,newFormattableMarkup('XSS attack @path was filtered by #theme',['@path'=>$path]));
}
/**
* Tests that #type=link bubbles outbound route/path processors' metadata.
$this->assertTrue($this->hasAttribute('hreflang',$rendered,$langcode),newFormattableMarkup('hreflang attribute with value @langcode is present on a rendered link when langcode is provided in the render array.',['@langcode'=>$langcode]));
$this->assertTrue($this->hasAttribute('hreflang',$rendered,'foo'),newFormattableMarkup('hreflang attribute with value @hreflang is present on a rendered link when @hreflang is provided in the render array.',['@hreflang'=>'foo']));
// Test the active class in links produced by
// \Drupal\Core\Utility\LinkGeneratorInterface::generate() and #type 'link'.
$options_no_query=[];
$options_no_query=[];
$options_query=[
$options_query=[
'query'=>[
'query'=>[
...
@@ -141,194 +56,6 @@ public function testLinkAttributes() {
...
@@ -141,194 +56,6 @@ public function testLinkAttributes() {
$links=$this->xpath('//a[@href = :href and not(contains(@class, :class))]',[':href'=>Url::fromRoute('common_test.l_active_class',[],$options_no_query)->toString(),':class'=>'is-active']);
$links=$this->xpath('//a[@href = :href and not(contains(@class, :class))]',[':href'=>Url::fromRoute('common_test.l_active_class',[],$options_no_query)->toString(),':class'=>'is-active']);
$this->assertTrue(isset($links[0]),'A link generated by the link generator to the current page without a query string when the current page has a query string is not marked active.');
$this->assertTrue(isset($links[0]),'A link generated by the link generator to the current page without a query string when the current page has a query string is not marked active.');
// Test adding a custom class in links produced by
// \Drupal\Core\Utility\LinkGeneratorInterface::generate() and #type 'link'.
$this->assertTrue($this->hasAttribute('class',$link_l,$class_l),newFormattableMarkup('Custom class @class is present on link when requested by Link::toString()',['@class'=>$class_l]));
// Test #type.
$class_theme=$this->randomMachineName();
$type_link=[
'#type'=>'link',
'#title'=>$this->randomMachineName(),
'#url'=>Url::fromRoute('<current>'),
'#options'=>[
'attributes'=>[
'class'=>[$class_theme],
],
],
];
$link_theme=$renderer->renderRoot($type_link);
$this->assertTrue($this->hasAttribute('class',$link_theme,$class_theme),newFormattableMarkup('Custom class @class is present on link when requested by #type',['@class'=>$class_theme]));
}
/**
* Tests that link functions support render arrays as 'text'.
$this->assertStringContainsString($encoded_path,$link,newFormattableMarkup('XSS attack @path was filtered by \Drupal\Core\Utility\LinkGeneratorInterface::generate().',['@path'=>$path]));
$this->assertStringNotContainsString($path,$link,newFormattableMarkup('XSS attack @path was filtered by \Drupal\Core\Utility\LinkGeneratorInterface::generate().',['@path'=>$path]));
// Test \Drupal\Core\Url.
$link=Url::fromUri('base:'.$path)->toString();
$this->assertStringContainsString($encoded_path,$link,newFormattableMarkup('XSS attack @path was filtered by #theme',['@path'=>$path]));
$this->assertStringNotContainsString($path,$link,newFormattableMarkup('XSS attack @path was filtered by #theme',['@path'=>$path]));
}
/**
* Tests that #type=link bubbles outbound route/path processors' metadata.
$this->assertTrue($this->hasAttribute('hreflang',$rendered,$langcode),newFormattableMarkup('hreflang attribute with value @langcode is present on a rendered link when langcode is provided in the render array.',['@langcode'=>$langcode]));
$this->assertTrue($this->hasAttribute('hreflang',$rendered,'foo'),newFormattableMarkup('hreflang attribute with value @hreflang is present on a rendered link when @hreflang is provided in the render array.',['@hreflang'=>'foo']));
// Test adding a custom class in links produced by
// \Drupal\Core\Utility\LinkGeneratorInterface::generate() and #type 'link'.
$this->assertTrue($this->hasAttribute('class',$link_l,$class_l),newFormattableMarkup('Custom class @class is present on link when requested by Link::toString()',['@class'=>$class_l]));
$this->assertTrue($this->hasAttribute('class',$link_theme,$class_theme),newFormattableMarkup('Custom class @class is present on link when requested by #type',['@class'=>$class_theme]));
}
/**
* Tests that link functions support render arrays as 'text'.