commit 27d196a1b0ee09c23e60c816a2a6aa5a25ff5198 Author: Joel Pittet Date: Fri Apr 18 23:20:22 2014 -0700 Found bits that were double escaping and marked them as raw/markup. Biggest change is that all _theme output is returned as safe markup because it's synonymous with including a template in a template. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index da18b6a..7556a2f 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -632,7 +632,8 @@ function _theme($hook, $variables = array()) { // restore path_to_theme() $theme_path = $temp; - return (string) $output; + + return new Markup($output); } /** @@ -2079,7 +2080,7 @@ function template_preprocess_page(&$variables) { // Move some variables to the top level for themer convenience and template cleanliness. $variables['show_messages'] = $variables['page']['#show_messages']; - $variables['title'] = $variables['page']['#title']; + $variables['title'] = new Markup($variables['page']['#title']); foreach (system_region_list($GLOBALS['theme']) as $region_key => $region_name) { if (!isset($variables['page'][$region_key])) { diff --git a/core/modules/color/templates/color-scheme-form.html.twig b/core/modules/color/templates/color-scheme-form.html.twig index 6cfacbd..4d39743 100644 --- a/core/modules/color/templates/color-scheme-form.html.twig +++ b/core/modules/color/templates/color-scheme-form.html.twig @@ -22,5 +22,5 @@ {{ form }}

{{ 'Preview'|t }}

- {{ html_preview }} + {{ html_preview|raw }} diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index f453971..c657117 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -11,7 +11,7 @@ */ #}
- {{ children }} + {{ children|raw }} {% if description %}
{{ description }}
{% endif %} diff --git a/core/modules/system/templates/breadcrumb.html.twig b/core/modules/system/templates/breadcrumb.html.twig index 5f322f9..d36a426 100644 --- a/core/modules/system/templates/breadcrumb.html.twig +++ b/core/modules/system/templates/breadcrumb.html.twig @@ -14,7 +14,7 @@

{{ 'You are here'|t }}

    {% for item in breadcrumb %} -
  1. {{ item }}
  2. +
  3. {{ item|raw }}
  4. {% endfor %}
diff --git a/core/modules/system/templates/checkboxes.html.twig b/core/modules/system/templates/checkboxes.html.twig index 00384d3..d38a918 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 }}
+{{ children|raw }} diff --git a/core/modules/system/templates/details.html.twig b/core/modules/system/templates/details.html.twig index 17ea820..6283dc2 100644 --- a/core/modules/system/templates/details.html.twig +++ b/core/modules/system/templates/details.html.twig @@ -17,17 +17,17 @@ #} {%- if title -%} - {{ title }} + {{ title|raw }} {%- endif -%}
{%- if description -%} -
{{ description }}
+
{{ description|raw }}
{%- endif -%} {%- if children -%} - {{ children }} + {{ children|raw }} {%- endif -%} {%- if value -%} - {{ value }} + {{ value|raw }} {%- endif -%}
diff --git a/core/modules/system/templates/form-element.html.twig b/core/modules/system/templates/form-element.html.twig index ea4d90f..788686a 100644 --- a/core/modules/system/templates/form-element.html.twig +++ b/core/modules/system/templates/form-element.html.twig @@ -52,7 +52,7 @@ {% endif %} {% if description.content %} - {{ description.content }} + {{ description.content|raw }} {% endif %} diff --git a/core/modules/system/templates/radios.html.twig b/core/modules/system/templates/radios.html.twig index e397644..01725b7 100644 --- a/core/modules/system/templates/radios.html.twig +++ b/core/modules/system/templates/radios.html.twig @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -{{ children }} +{{ children|raw }} diff --git a/core/modules/system/templates/select.html.twig b/core/modules/system/templates/select.html.twig index 21f32ac..6a24ffd 100644 --- a/core/modules/system/templates/select.html.twig +++ b/core/modules/system/templates/select.html.twig @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -{{ options }} +{{ options|raw }} diff --git a/core/modules/system/templates/status-messages.html.twig b/core/modules/system/templates/status-messages.html.twig index 505eb20..e86df24 100644 --- a/core/modules/system/templates/status-messages.html.twig +++ b/core/modules/system/templates/status-messages.html.twig @@ -34,11 +34,11 @@ {% if messages|length > 1 %}
    {% for message in messages %} -
  • {{ message }}
  • +
  • {{ message|raw }}
  • {% endfor %}
{% else %} - {{ messages.0 }} + {{ messages.0|raw }} {% endif %} {% if type == 'error' %} diff --git a/core/modules/views/templates/views-view-grid.html.twig b/core/modules/views/templates/views-view-grid.html.twig index a5a813c..bfadb8e 100644 --- a/core/modules/views/templates/views-view-grid.html.twig +++ b/core/modules/views/templates/views-view-grid.html.twig @@ -31,7 +31,7 @@ {% for column in row.content %} - {{ column.content }} + {{ column.content|raw }} {% endfor %} @@ -41,7 +41,7 @@ {% for row in column.content %} - {{ row.content }} + {{ row.content|raw }} {% endfor %} diff --git a/core/modules/views/templates/views-view-table.html.twig b/core/modules/views/templates/views-view-table.html.twig index 6b0b26c..7b1f280 100644 --- a/core/modules/views/templates/views-view-table.html.twig +++ b/core/modules/views/templates/views-view-table.html.twig @@ -51,7 +51,7 @@ {% for column in header %} - {{ column.content }} + {{ column.content|raw }} {% endfor %} @@ -62,7 +62,7 @@ {% for column in row.columns %} - {{ column.content }} + {{ column.content|raw }} {% endfor %}