trac-wiki 0.0.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -277,11 +277,12 @@ module TracWiki
277
277
  end
278
278
 
279
279
  if no_link?
280
- @out << escape_html(whole)
281
- return
280
+ if uri !~ /^(ftp|https?):/
281
+ @out << escape_html(whole)
282
+ return
283
+ end
282
284
  end
283
285
 
284
- make_explicit_link(link)
285
286
  @out << '<a href="' << escape_html(uri) << '">'
286
287
  if content
287
288
  until content.empty?
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
3
3
  end
data/test/parser_test.rb CHANGED
@@ -468,7 +468,9 @@ describe TracWiki::Parser do
468
468
  # Not escaping inside URLs
469
469
  tc "<p><a href=\"http://example.org/~user/\">http://example.org/~user/</a></p>\n", "http://example.org/~user/"
470
470
  tc "<p><a href=\"http://example.org/~user/\">http://example.org/~user/</a></p>\n", "[http://example.org/~user/]"
471
- tc "<p>[[http://example.org/~user/]]</p>\n", "[http://example.org/~user/]", :no_link=>true
471
+ tc "<p><a href=\"http://example.org/~user/\">http://example.org/~user/</a></p>\n", "[http://example.org/~user/]", :no_link=>true
472
+ tc "<p><a href=\"http://example.org/~user/\">http://example.org/~user/</a></p>\n", "[[http://example.org/~user/]]", :no_link=>true
473
+ tc "<p><a href=\"http://example.org/~user/\">http://example.org/~user/</a></p>\n", "[[http://example.org/~user/]]"
472
474
 
473
475
  # Escaping links
474
476
  tc "<p>http://www.example.org/</p>\n", "!http://www.example.org/"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trac-wiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: