Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -9,7 +9,7 @@ namespace Drupal\Core\Diff;
use Drupal\Component\Diff\DiffFormatter as DiffFormatterBase;
use Drupal\Component\Diff\WordLevelDiff;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Html;
use Drupal\Core\Config\ConfigFactoryInterface;
/**
@ -107,7 +107,7 @@ class DiffFormatter extends DiffFormatterBase {
'class' => 'diff-marker',
),
array(
'data' => $line,
'data' => ['#markup' => $line],
'class' => 'diff-context diff-addedline',
)
);
@ -129,7 +129,7 @@ class DiffFormatter extends DiffFormatterBase {
'class' => 'diff-marker',
),
array(
'data' => $line,
'data' => ['#markup' => $line],
'class' => 'diff-context diff-deletedline',
)
);
@ -148,7 +148,7 @@ class DiffFormatter extends DiffFormatterBase {
return array(
' ',
array(
'data' => $line,
'data' => ['#markup' => $line],
'class' => 'diff-context',
)
);
@ -172,7 +172,7 @@ class DiffFormatter extends DiffFormatterBase {
*/
protected function _added($lines) {
foreach ($lines as $line) {
$this->rows[] = array_merge($this->emptyLine(), $this->addedLine(SafeMarkup::checkPlain($line)));
$this->rows[] = array_merge($this->emptyLine(), $this->addedLine(Html::escape($line)));
}
}
@ -181,7 +181,7 @@ class DiffFormatter extends DiffFormatterBase {
*/
protected function _deleted($lines) {
foreach ($lines as $line) {
$this->rows[] = array_merge($this->deletedLine(SafeMarkup::checkPlain($line)), $this->emptyLine());
$this->rows[] = array_merge($this->deletedLine(Html::escape($line)), $this->emptyLine());
}
}
@ -190,7 +190,7 @@ class DiffFormatter extends DiffFormatterBase {
*/
protected function _context($lines) {
foreach ($lines as $line) {
$this->rows[] = array_merge($this->contextLine(SafeMarkup::checkPlain($line)), $this->contextLine(SafeMarkup::checkPlain($line)));
$this->rows[] = array_merge($this->contextLine(Html::escape($line)), $this->contextLine(Html::escape($line)));
}
}
@ -198,6 +198,8 @@ class DiffFormatter extends DiffFormatterBase {
* {@inheritdoc}
*/
protected function _changed($orig, $closing) {
$orig = array_map('\Drupal\Component\Utility\Html::escape', $orig);
$closing = array_map('\Drupal\Component\Utility\Html::escape', $closing);
$diff = new WordLevelDiff($orig, $closing);
$del = $diff->orig();
$add = $diff->closing();