lib/govspeak.rb in govspeak-8.2.0 vs lib/govspeak.rb in govspeak-8.2.1
- old
+ new
@@ -449,9 +449,11 @@
def encode(text)
HTMLEntities.new.encode(text)
end
def add_acronym_alt_text(html)
+ return unless html
+
@acronyms.each do |acronym|
html.gsub!(acronym[0], "<abbr title=\"#{acronym[1].strip}\">#{acronym[0]}</abbr>")
end
html