Skip to content

Commit

Permalink
printing_templates: mark 'dive.notes' as 'safe'
Browse files Browse the repository at this point in the history
Grantlee has a way to display a variable as HTML by
marking it as 'safe' e.g.:
{{ dive.notes|safe }}

This allows any HTML to be preserved when printing.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
neolit123 authored and dirkhh committed Nov 16, 2015
1 parent 00a085f commit 1d4075f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion printing_templates/Flowlayout.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h1> Notes </h1>
<tr>
<td class="fieldData">
<div class="textArea">
<p> {{ dive.notes }} </p>
<p> {{ dive.notes|safe }} </p>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion printing_templates/One Dive.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h1> Notes </h1>
<tr>
<td class="fieldData">
<div class="textArea">
<p> {{ dive.notes }} </p>
<p> {{ dive.notes|safe }} </p>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion printing_templates/Six Dives.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h1> Dive # {{ dive.number }} - {{ dive.date }} {{ dive.time }}</h1>
<tr>
<td>
<div class="textArea">
<p> {{ dive.notes }} </p>
<p> {{ dive.notes|safe }} </p>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion printing_templates/Two Dives.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h1> Notes </h1>
<tr>
<td class="fieldData">
<div class="textArea">
<p> {{ dive.notes }} </p>
<p> {{ dive.notes|safe }} </p>
</div>
</td>
</tr>
Expand Down

0 comments on commit 1d4075f

Please sign in to comment.