lib/wikilink/converter/utils.rb in wikilink-converter-0.2.3 vs lib/wikilink/converter/utils.rb in wikilink-converter-0.2.4
- old
+ new
@@ -29,10 +29,9 @@
attributes.delete(:class) if attributes[:class].empty?
attributes = attributes.inject('') do |memo, (key, value)|
memo + key.to_s + '="' + CGI.escape_html(value) + '" '
end
url, fragment = url.split('#', 2)
- url = URI.encode(url)
if fragment
url << '#' + URI.encode(fragment, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
%Q{<a #{attributes}href="#{url}">#{CGI.escape_html name}</a>}