lib/nanoc3/helpers/link_to.rb in nanoc3-3.0.2 vs lib/nanoc3/helpers/link_to.rb in nanoc3-3.0.3
- old
+ new
@@ -42,10 +42,10 @@
attributes = attributes.inject('') do |memo, (key, value)|
memo + key.to_s + '="' + h(value) + '" '
end
# Create link
- "<a #{attributes}href=\"#{path}\">#{text}</a>"
+ "<a #{attributes}href=\"#{h path}\">#{text}</a>"
end
# Creates a HTML link using link_to, except when the linked item is the
# current one. In this case, a span element with class "active" and with
# the given text will be returned.