Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Annotation\FormElement.
*/
namespace Drupal\Core\Render\Annotation;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Annotation\RenderElement.
*/
namespace Drupal\Core\Render\Annotation;
use Drupal\Component\Annotation\PluginID;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\AttachmentsInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\AttachmentsResponseProcessorInterface.
*/
namespace Drupal\Core\Render;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\AttachmentsTrait.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\BareHtmlPageRenderer.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\BareHtmlPageRendererInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\BubbleableMetadata.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Utility\NestedArray;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Utility\SafeMarkup;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Actions.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Ajax.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Button.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Checkbox.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Checkboxes.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Color.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\CompositeFormElementTrait.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Container.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Utility\Html as HtmlUtility;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Date.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Details.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Dropbutton.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\ElementInterface.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Plugin\PluginInspectionInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Email.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Fieldgroup.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,14 +1,7 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Fieldset.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;
/**
* Provides a render element for a group of form elements.
*

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\File.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,14 +1,7 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Form.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;
/**
* Provides a render element for a form.
*

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\FormElement.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\FormElementInterface.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Hidden.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Html.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\HtmlTag.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Render\MarkupInterface;
use Drupal\Component\Utility\Html as HtmlUtility;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Render\Markup;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Template\Attribute;
@ -97,7 +92,7 @@ class HtmlTag extends RenderElement {
// Construct all other elements.
else {
$markup .= '>';
$markup .= SafeMarkup::isSafe($element['#value']) ? $element['#value'] : Xss::filterAdmin($element['#value']);
$markup .= $element['#value'] instanceof MarkupInterface ? $element['#value'] : Xss::filterAdmin($element['#value']);
$markup .= '</' . $escaped_tag . ">\n";
}
if (!empty($element['#noscript'])) {
@ -165,17 +160,17 @@ class HtmlTag extends RenderElement {
// conditional comment markup. The conditional comment expression is
// evaluated by Internet Explorer only. To control the rendering by other
// browsers, use either the "downlevel-hidden" or "downlevel-revealed"
// technique. See http://en.wikipedia.org/wiki/Conditional_comment
// technique. See http://wikipedia.org/wiki/Conditional_comment
// for details.
// Ensure what we are dealing with is safe.
// This would be done later anyway in drupal_render().
$prefix = isset($element['#prefix']) ? $element['#prefix'] : '';
if ($prefix && !SafeMarkup::isSafe($prefix)) {
if ($prefix && !($prefix instanceof MarkupInterface)) {
$prefix = Xss::filterAdmin($prefix);
}
$suffix = isset($element['#suffix']) ? $element['#suffix'] : '';
if ($suffix && !SafeMarkup::isSafe($suffix)) {
if ($suffix && !($suffix instanceof MarkupInterface)) {
$suffix = Xss::filterAdmin($suffix);
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\ImageButton.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\InlineTemplate.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Item.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Label.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\LanguageSelect.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Language\LanguageInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Link.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Utility\NestedArray;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\MachineName.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Utility\NestedArray;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\MoreLink.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Number.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Operations.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Page.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\PageTitle.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,14 +1,7 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Pager.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;
/**
* Provides a render element for a pager.
*

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Password.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\PasswordConfirm.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\PathElement.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Radio.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Radios.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Range.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\RenderElement.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormBuilderInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Search.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Select.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\StatusMessages.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Submit.
*/
namespace Drupal\Core\Render\Element;
/**
@ -22,7 +17,7 @@ namespace Drupal\Core\Render\Element;
* Usage Example:
* @code
* $form['actions']['submit'] = array(
* '#type' => 'submit,
* '#type' => 'submit',
* '#value' => $this->t('Save'),
* );
* @endcode

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\SystemCompactLink.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Url as BaseUrl;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Table.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Tableselect.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Tel.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Render\Element;

View file

@ -1,14 +1,8 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Textarea.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
/**
* Provides a form element for input of multiple-line text.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Textfield.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Token.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Url.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Component\Utility\UrlHelper;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Value.
*/
namespace Drupal\Core\Render\Element;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\VerticalTabs.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Element\Weight.
*/
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\ElementInfoManager.
*/
namespace Drupal\Core\Render;
use Drupal\Core\Cache\Cache;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\ElementInfoManagerInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\HtmlResponse.
*/
namespace Drupal\Core\Render;
use Drupal\Core\Cache\CacheableMetadata;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\HtmlResponseAttachmentsProcessor.
*/
namespace Drupal\Core\Render;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\AjaxRenderer.
*/
namespace Drupal\Core\Render\MainContent;
use Drupal\Core\Ajax\AjaxResponse;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\DialogRenderer.
*/
namespace Drupal\Core\Render\MainContent;
use Drupal\Component\Utility\Html;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\HtmlRenderer.
*/
namespace Drupal\Core\Render\MainContent;
use Drupal\Component\Plugin\PluginManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\MainContentRendererInterface.
*/
namespace Drupal\Core\Render\MainContent;
use Drupal\Core\Routing\RouteMatchInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\MainContentRenderersPass.
*/
namespace Drupal\Core\Render\MainContent;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MainContent\ModalRenderer.
*/
namespace Drupal\Core\Render\MainContent;
use Drupal\Core\Ajax\AjaxResponse;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Markup.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Render\MarkupInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\MetadataBubblingUrlGenerator.
*/
namespace Drupal\Core\Render;
use Drupal\Core\GeneratedUrl;
@ -96,8 +91,8 @@ class MetadataBubblingUrlGenerator implements UrlGeneratorInterface {
/**
* {@inheritdoc}
*/
public function generate($name, $parameters = array(), $absolute = FALSE) {
$options['absolute'] = $absolute;
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) {
$options['absolute'] = is_bool($referenceType) ? $referenceType : $referenceType === self::ABSOLUTE_URL;
$generated_url = $this->generateFromRoute($name, $parameters, $options, TRUE);
$this->bubble($generated_url);
return $generated_url->getGeneratedUrl();

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\PageDisplayVariantSelectionEvent.
*/
namespace Drupal\Core\Render;
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy.
*/
namespace Drupal\Core\Render\Placeholder;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface.
*/
namespace Drupal\Core\Render\Placeholder;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Placeholder\SingleFlushStrategy.
*/
namespace Drupal\Core\Render\Placeholder;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\PlaceholderGenerator.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Utility\Html;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\PlaceholderGeneratorInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\PlaceholderingRenderCache.
*/
namespace Drupal\Core\Render;
use Drupal\Core\Cache\CacheFactoryInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant.
*/
namespace Drupal\Core\Render\Plugin\DisplayVariant;
use Drupal\Core\Display\PageVariantInterface;

View file

@ -1,13 +1,7 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RenderCache.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\Context\CacheContextsManager;
@ -341,12 +335,6 @@ class RenderCache implements RenderCacheInterface {
// the cache entry size.
if (!empty($elements['#cache_properties']) && is_array($elements['#cache_properties'])) {
$data['#cache_properties'] = $elements['#cache_properties'];
// Ensure that any safe strings are a Markup object.
foreach (Element::properties(array_flip($elements['#cache_properties'])) as $cache_property) {
if (isset($elements[$cache_property]) && is_scalar($elements[$cache_property]) && SafeMarkup::isSafe($elements[$cache_property])) {
$elements[$cache_property] = Markup::create($elements[$cache_property]);
}
}
// Extract all the cacheable items from the element using cache
// properties.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RenderCacheInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RenderContext.
*/
namespace Drupal\Core\Render;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RenderEvents.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RenderableInterface.
*/
namespace Drupal\Core\Render;
/**

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\Renderer.
*/
namespace Drupal\Core\Render;
use Drupal\Component\Render\MarkupInterface;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Access\AccessResultInterface;
use Drupal\Core\Cache\Cache;
@ -675,11 +670,12 @@ class Renderer implements RendererInterface {
* A string.
*
* @return \Drupal\Core\Render\Markup
* The escaped string wrapped in a Markup object. If
* SafeMarkup::isSafe($string) returns TRUE, it won't be escaped again.
* The escaped string wrapped in a Markup object. If the string is an
* instance of \Drupal\Component\Render\MarkupInterface, it won't be escaped
* again.
*/
protected function xssFilterAdminIfUnsafe($string) {
if (!SafeMarkup::isSafe($string)) {
if (!($string instanceof MarkupInterface)) {
$string = Xss::filterAdmin($string);
}
return Markup::create($string);
@ -704,8 +700,8 @@ class Renderer implements RendererInterface {
* A render array with #markup set.
*
* @return \Drupal\Component\Render\MarkupInterface|string
* The escaped markup wrapped in a Markup object. If
* SafeMarkup::isSafe($elements['#markup']) returns TRUE, it won't be
* The escaped markup wrapped in a Markup object. If $elements['#markup']
* is an instance of \Drupal\Component\Render\MarkupInterface, it won't be
* escaped or filtered again.
*
* @see \Drupal\Component\Utility\Html::escape()
@ -720,7 +716,7 @@ class Renderer implements RendererInterface {
if (!empty($elements['#plain_text'])) {
$elements['#markup'] = Markup::create(Html::escape($elements['#plain_text']));
}
elseif (!SafeMarkup::isSafe($elements['#markup'])) {
elseif (!($elements['#markup'] instanceof MarkupInterface)) {
// The default behaviour is to XSS filter using the admin tag list.
$tags = isset($elements['#allowed_tags']) ? $elements['#allowed_tags'] : Xss::getAdminTagList();
$elements['#markup'] = Markup::create(Xss::filter($elements['#markup'], $tags));

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Render\RendererInterface.
*/
namespace Drupal\Core\Render;
/**