commit 4bc41c90d17c99b95f785c517fa3ac9e79440c91 Author: Joel Pittet Date: Thu May 1 20:36:05 2014 -0700 fix contextual filters and views ui diff --git a/core/includes/common.inc b/core/includes/common.inc index 248de79..9c59e0c 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1083,7 +1083,7 @@ function l($text, $path, array $options = array()) { // Sanitize the link text if necessary. $text = $variables['options']['html'] ? $variables['text'] : String::checkPlain($variables['text']); - return '' . $text . ''; + return new Markup('' . $text . ''); } /** diff --git a/core/includes/form.inc b/core/includes/form.inc index 46691dc..c72f944 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1182,7 +1182,7 @@ function template_preprocess_radios(&$variables) { if (isset($element['#attributes']['title'])) { $variables['attributes']['title'] = $element['#attributes']['title']; } - $variables['children'] = $element['#children']; + $variables['children'] = new Markup($element['#children']); } /** @@ -1360,7 +1360,7 @@ function template_preprocess_checkboxes(&$variables) { if (isset($element['#attributes']['title'])) { $variables['attributes']['title'] = $element['#attributes']['title']; } - $variables['children'] = $element['#children']; + $variables['children'] = new Markup($element['#children']); } /** diff --git a/core/modules/aggregator/templates/aggregator-feed-source.html.twig b/core/modules/aggregator/templates/aggregator-feed-source.html.twig index d492904..3dc348b 100644 --- a/core/modules/aggregator/templates/aggregator-feed-source.html.twig +++ b/core/modules/aggregator/templates/aggregator-feed-source.html.twig @@ -22,7 +22,7 @@ {{ source_icon }} {{ source_image }} -

{{ source_description }}

+

{{ source_description|raw }}

{{ 'URL'|t }}
{{ source_url }}
diff --git a/core/modules/block/custom_block/templates/custom-block-add-list.html.twig b/core/modules/block/custom_block/templates/custom-block-add-list.html.twig index d2af8e8..615f9ee 100644 --- a/core/modules/block/custom_block/templates/custom-block-add-list.html.twig +++ b/core/modules/block/custom_block/templates/custom-block-add-list.html.twig @@ -18,7 +18,7 @@
{% for type in types %}
{{ type.link }}
-
{{ type.description }}
+
{{ type.description|raw }}
{% endfor %}
{% endspaceless %} diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module index c8dd4d1..e30301f 100644 --- a/core/modules/datetime/datetime.module +++ b/core/modules/datetime/datetime.module @@ -8,6 +8,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Template\Attribute; +use Drupal\Core\Template\Markup; use Drupal\datetime\DateHelper; use Drupal\node\NodeInterface; @@ -241,7 +242,7 @@ function template_preprocess_datetime_wrapper(&$variables) { $variables['description'] = $element['#description']; } - $variables['content'] = $element['#children']; + $variables['content'] = new Markup($element['#children']); } /** diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index c657117..f64fad8 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -13,6 +13,6 @@
{{ children|raw }} {% if description %} -
{{ description }}
+
{{ description|raw }}
{% endif %}
diff --git a/core/modules/node/templates/node-add-list.html.twig b/core/modules/node/templates/node-add-list.html.twig index 7323896..29ed28c 100644 --- a/core/modules/node/templates/node-add-list.html.twig +++ b/core/modules/node/templates/node-add-list.html.twig @@ -19,7 +19,7 @@
{% for type in types %}
{{ type.add_link }}
-
{{ type.description }}
+
{{ type.description|raw }}
{% endfor %}
{% else %} diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 9ba1a1c..4b1147b 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -10,6 +10,7 @@ use Drupal\Core\Extension\Extension; use Drupal\Core\Render\Element; use Drupal\Core\Template\Attribute; +use Drupal\Core\Template\Markup; /** * Recursively check compatibility. @@ -58,9 +59,9 @@ function template_preprocess_admin_block_content(&$variables) { $variables['attributes']['class'][] = 'compact'; } foreach ($variables['content'] as $key => $item) { - $variables['content'][$key]['link'] = l($item['title'], $item['link_path'], $item['localized_options']); + $variables['content'][$key]['link'] = new Markup(l($item['title'], $item['link_path'], $item['localized_options'])); if (!$compact && isset($item['description'])) { - $variables['content'][$key]['description'] = Xss::filterAdmin($item['description']); + $variables['content'][$key]['description'] = new Markup(Xss::filterAdmin($item['description'])); } else { $variables['content'][$key]['description'] = FALSE; diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index a49bf10..6670bf9 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -20,7 +20,7 @@ {% for item in content %}
{{ item.link }}
{% if item.description %} -
{{ item.description }}
+
{{ item.description|raw }}
{% endif %} {% endfor %}
diff --git a/core/modules/system/templates/checkboxes.html.twig b/core/modules/system/templates/checkboxes.html.twig index d38a918..00384d3 100644 --- a/core/modules/system/templates/checkboxes.html.twig +++ b/core/modules/system/templates/checkboxes.html.twig @@ -14,4 +14,4 @@ @todo: remove this file once http://drupal.org/node/1819284 is resolved. This is identical to core/modules/system/templates/container.html.twig #} -{{ children|raw }} +{{ children }} diff --git a/core/modules/system/templates/fieldset.html.twig b/core/modules/system/templates/fieldset.html.twig index f7fed3a..9e4fe68 100644 --- a/core/modules/system/templates/fieldset.html.twig +++ b/core/modules/system/templates/fieldset.html.twig @@ -31,7 +31,7 @@ {% if prefix %} {{ prefix }} {% endif %} - {{ children|raw }} + {{ children }} {% if suffix %} {{ suffix }} {% endif %} diff --git a/core/modules/system/templates/radios.html.twig b/core/modules/system/templates/radios.html.twig index 01725b7..e397644 100644 --- a/core/modules/system/templates/radios.html.twig +++ b/core/modules/system/templates/radios.html.twig @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -{{ children|raw }} +{{ children }} diff --git a/core/modules/system/templates/status-report.html.twig b/core/modules/system/templates/status-report.html.twig index 7d0d96d..2c17e9c 100644 --- a/core/modules/system/templates/status-report.html.twig +++ b/core/modules/system/templates/status-report.html.twig @@ -33,9 +33,9 @@ {{ requirement.title }} - {{ requirement.value }} + {{ requirement.value|raw }} {% if requirement.description %} -
{{ requirement.description }}
+
{{ requirement.description|raw }}
{% endif %} diff --git a/core/modules/system/templates/system-themes-page.html.twig b/core/modules/system/templates/system-themes-page.html.twig index fa0e748..2c18ce3 100644 --- a/core/modules/system/templates/system-themes-page.html.twig +++ b/core/modules/system/templates/system-themes-page.html.twig @@ -42,7 +42,7 @@ ({{ theme.notes|join(', ') }}) {%- endif -%} -
{{ theme.description }}
+
{{ theme.description|raw }}
{# Display operation links if the theme is compatible. #} {% if theme.incompatible %}
{{ theme.incompatible }}
diff --git a/core/modules/system/templates/vertical-tabs.html.twig b/core/modules/system/templates/vertical-tabs.html.twig index 98fe6d6..5db74a5 100644 --- a/core/modules/system/templates/vertical-tabs.html.twig +++ b/core/modules/system/templates/vertical-tabs.html.twig @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -
{{ children|Raw }}
+
{{ children|raw }}
diff --git a/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig b/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig index 1c67469..9dc0cfd 100644 --- a/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig +++ b/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig @@ -20,6 +20,6 @@ {{ description }} {%- endif %} {% if settings_links %} - {{ settings_links|join(' | ') }} + {{ settings_links|join(' | ')|raw }} {% endif %} diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index 430f14a..9d1f07a 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -7,6 +7,7 @@ use Drupal\Core\Render\Element; use Drupal\Core\Template\Attribute; +use Drupal\Core\Template\Markup; /** * Prepares variables for Views UI display tab setting templates. @@ -72,7 +73,7 @@ function template_preprocess_views_ui_display_tab_bucket(&$variables) { $variables['attributes']['title'][] = t('Overridden'); } - $variables['content'] = $element['#children']; + $variables['content'] = new Markup($element['#children']); $variables['title'] = $element['#title']; $variables['actions'] = !empty($element['#actions']) ? $element['#actions'] : array(); }