Skip to content

Commit

Permalink
Allow some basic HTML tags in story description
Browse files Browse the repository at this point in the history
  • Loading branch information
julinvictus authored and ice1080 committed Nov 14, 2023
1 parent f682903 commit b2847f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rails/app/javascript/components/Story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Story = props => {
{story.title}
{story.permission_level === "restricted" && " 🔒"}
</h6>
<p className="description">{story.desc}</p>
<p className="description" dangerouslySetInnerHTML={{ __html: story.desc }}></p>
{
story.media &&
story.media.map(file => (
Expand Down
2 changes: 1 addition & 1 deletion rails/app/views/dashboard/stories/_stories.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span class="badge badge-green"><%= Story.human_attribute_name("permission_level.#{story.permission_level}") %></span>
<% end %>

<p><%= story.desc %></p>
<p><%= sanitize story.desc, tags: %w(strong em u) %></p>
</div>

<div>
Expand Down
2 changes: 1 addition & 1 deletion rails/app/views/dashboard/stories/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</div>

<div class="two-columns-left">
<p class="render-lines"><%= @story.desc %></p>
<p class="render-lines"><%= sanitize @story.desc, tags: %w(strong em u) %></p>

<% @story.media.each do |media| %>
<p class="media">
Expand Down

0 comments on commit b2847f2

Please sign in to comment.