Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b5a8981

Browse filesBrowse files
committed
[WebProfilerBundle] Change default tab to HTML Preview
1 parent d8b8c8c commit b5a8981
Copy full SHA for b5a8981

File tree

1 file changed

+12
-12
lines changed
Filter options

1 file changed

+12
-12
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,27 +183,27 @@
183183
{% if message.htmlBody %}
184184
{% set htmlBody = message.htmlBody() %}
185185
<div class="tab">
186-
<h3 class="tab-title">HTML content</h3>
186+
<h3 class="tab-title">HTML preview</h3>
187187
<div class="tab-content">
188188
<pre class="prewrap" style="max-height: 600px">
189-
{%- if message.htmlCharset() %}
190-
{{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
191-
{%- else %}
192-
{{- htmlBody }}
193-
{%- endif -%}
189+
<iframe
190+
src="data:text/html;charset=utf-8;base64,{{ collector.base64Encode(htmlBody) }}"
191+
style="height: 80vh;width: 100%;"
192+
>
193+
</iframe>
194194
</pre>
195195
</div>
196196
</div>
197197

198198
<div class="tab">
199-
<h3 class="tab-title">HTML preview</h3>
199+
<h3 class="tab-title">HTML content</h3>
200200
<div class="tab-content">
201201
<pre class="prewrap" style="max-height: 600px">
202-
<iframe
203-
src="data:text/html;charset=utf-8;base64,{{ collector.base64Encode(htmlBody) }}"
204-
style="height: 80vh;width: 100%;"
205-
>
206-
</iframe>
202+
{%- if message.htmlCharset() %}
203+
{{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
204+
{%- else %}
205+
{{- htmlBody }}
206+
{%- endif -%}
207207
</pre>
208208
</div>
209209
</div>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.