mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
safely call html_safe on category description
The `categories.description` column is not modified as "not null", so it is possible for the description to be nil. This changes the code not call html_safe on nil.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<h2><a href='<%= c.url %>' itemprop='item'>
|
<h2><a href='<%= c.url %>' itemprop='item'>
|
||||||
<span itemprop='name'><%= c.name %></span>
|
<span itemprop='name'><%= c.name %></span>
|
||||||
</a></h2>
|
</a></h2>
|
||||||
<span itemprop='description'><%= c.description.html_safe %></span>
|
<span itemprop='description'><%= c.description&.html_safe %></span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user