comparison core/lib/Drupal/Core/Render/Renderer.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 1fec387a4317
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
507 } 507 }
508 508
509 // We store the resulting output in $elements['#markup'], to be consistent 509 // We store the resulting output in $elements['#markup'], to be consistent
510 // with how render cached output gets stored. This ensures that placeholder 510 // with how render cached output gets stored. This ensures that placeholder
511 // replacement logic gets the same data to work with, no matter if #cache is 511 // replacement logic gets the same data to work with, no matter if #cache is
512 // disabled, #cache is enabled, there is a cache hit or miss. 512 // disabled, #cache is enabled, there is a cache hit or miss. If
513 $prefix = isset($elements['#prefix']) ? $this->xssFilterAdminIfUnsafe($elements['#prefix']) : ''; 513 // #render_children is set the #prefix and #suffix will have already been
514 $suffix = isset($elements['#suffix']) ? $this->xssFilterAdminIfUnsafe($elements['#suffix']) : ''; 514 // added.
515 515 if (isset($elements['#render_children'])) {
516 $elements['#markup'] = Markup::create($prefix . $elements['#children'] . $suffix); 516 $elements['#markup'] = Markup::create($elements['#children']);
517 }
518 else {
519 $prefix = isset($elements['#prefix']) ? $this->xssFilterAdminIfUnsafe($elements['#prefix']) : '';
520 $suffix = isset($elements['#suffix']) ? $this->xssFilterAdminIfUnsafe($elements['#suffix']) : '';
521 $elements['#markup'] = Markup::create($prefix . $elements['#children'] . $suffix);
522 }
517 523
518 // We've rendered this element (and its subtree!), now update the context. 524 // We've rendered this element (and its subtree!), now update the context.
519 $context->update($elements); 525 $context->update($elements);
520 526
521 // Cache the processed element if both $pre_bubbling_elements and $elements 527 // Cache the processed element if both $pre_bubbling_elements and $elements