Unescape HTML entities in taxonomy block
This commit is contained in:
parent
216f4391d9
commit
bdd5effd93
1 changed files with 2 additions and 2 deletions
|
|
@ -281,10 +281,10 @@ module DepiedencapAiCitations
|
||||||
|
|
||||||
lines = ["## Forum categories (public — where discussions live)"]
|
lines = ["## Forum categories (public — where discussions live)"]
|
||||||
by_parent[nil].to_a.each do |parent|
|
by_parent[nil].to_a.each do |parent|
|
||||||
pdesc = parent.description.to_s.gsub(/<[^>]+>/, " ").squish
|
pdesc = CGI.unescapeHTML(parent.description.to_s.gsub(/<[^>]+>/, " ")).squish
|
||||||
lines << "#{parent.name}#{pdesc.present? ? " — #{pdesc}" : ""}"
|
lines << "#{parent.name}#{pdesc.present? ? " — #{pdesc}" : ""}"
|
||||||
by_parent[parent.id].to_a.each do |child|
|
by_parent[parent.id].to_a.each do |child|
|
||||||
cdesc = child.description.to_s.gsub(/<[^>]+>/, " ").squish
|
cdesc = CGI.unescapeHTML(child.description.to_s.gsub(/<[^>]+>/, " ")).squish
|
||||||
lines << " - #{child.name}#{cdesc.present? ? " — #{cdesc}" : ""}"
|
lines << " - #{child.name}#{cdesc.present? ? " — #{cdesc}" : ""}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue