Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains Drupal\Component\Render\FormattableMarkup.
|
||||
* Contains \Drupal\Component\Render\FormattableMarkup.
|
||||
*/
|
||||
|
||||
namespace Drupal\Component\Render;
|
||||
|
@ -65,7 +65,7 @@ use Drupal\Component\Utility\UrlHelper;
|
|||
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
|
||||
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
|
||||
*/
|
||||
class FormattableMarkup implements MarkupInterface {
|
||||
class FormattableMarkup implements MarkupInterface, \Countable {
|
||||
|
||||
/**
|
||||
* The arguments to replace placeholders with.
|
||||
|
@ -223,7 +223,6 @@ class FormattableMarkup implements MarkupInterface {
|
|||
break;
|
||||
|
||||
case '%':
|
||||
default:
|
||||
// Similarly to @, escape non-safe values. Also, add wrapping markup
|
||||
// in order to render as a placeholder. Not for use within attributes,
|
||||
// per the warning above about
|
||||
|
@ -231,6 +230,16 @@ class FormattableMarkup implements MarkupInterface {
|
|||
// due to the wrapping markup.
|
||||
$args[$key] = '<em class="placeholder">' . static::placeholderEscape($value) . '</em>';
|
||||
break;
|
||||
|
||||
default:
|
||||
// We do not trigger an error for placeholder that start with an
|
||||
// alphabetic character.
|
||||
if (!ctype_alpha($key[0])) {
|
||||
// We trigger an error as we may want to introduce new placeholders
|
||||
// in the future without breaking backward compatibility.
|
||||
trigger_error('Invalid placeholder: ' . $key, E_USER_ERROR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ use Drupal\Component\Utility\Unicode;
|
|||
*
|
||||
* @ingroup sanitization
|
||||
*/
|
||||
class HtmlEscapedText implements MarkupInterface {
|
||||
class HtmlEscapedText implements MarkupInterface, \Countable {
|
||||
|
||||
/**
|
||||
* The string to escape.
|
||||
|
|
Reference in a new issue