Skip to content

Commit

Permalink
fix: HTML escale ability and hero icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitcheljager committed Nov 22, 2024
1 parent 1f03e6d commit 9566dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/content_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def markdown_gallery(text)
def markdown_hero_icon(text)
text.gsub /\[hero\s+([\p{L}\p{N}_:.\-\s]+)\]/ do
begin
hero_name = $1.strip
hero_name = ERB::Util.html_escape($1.strip)
ActionController::Base.helpers.image_tag(hero_name_to_icon_url(hero_name), width: 50, height: 50, loading: "lazy", alt: $1)
rescue; end
end
Expand All @@ -138,7 +138,7 @@ def markdown_hero_icon(text)
def markdown_ability_icon(text)
text.gsub /\[ability\s+([\p{L}\p{N}_:.\-\s]+)\]/ do
begin
ability_name = $1.strip
ability_name = ERB::Util.html_escape($1.strip)
ActionController::Base.helpers.image_tag(ability_name_to_icon_url(ability_name), height: 50, loading: "lazy", alt: $1)
rescue; end
end
Expand Down

0 comments on commit 9566dfa

Please sign in to comment.