trac-wiki 0.3.32 → 0.3.33

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 486c2d7cf3dd8fbcb005759e6ef0cd9aa95dfc38
4
- data.tar.gz: 25938551d6ec9e52aedfc163f738143476d9b406
3
+ metadata.gz: e8bb3c1e9f2eab0e8db5d7c0324681ec9304f274
4
+ data.tar.gz: a3aab7d22cfe4e67a3876a867ef50f368af75768
5
5
  SHA512:
6
- metadata.gz: f36f872853aa702f736f8d402acf2528ccdd9ff2b203ccbdd7635ae4fa78bf3b6e36e30dbf9e04216be1ae752bcba147ac05e84f4e7d3ede62479a16f7d91aed
7
- data.tar.gz: c81847b6bbff57636edd5722165374aa01be69c0a62eee3a3bcdaf2ee2d244fa60f3445ee928dea9bd6c892a86fc7776aff34cdccf846307ec1e58b3c3652896
6
+ metadata.gz: efa8577220c3ff60f23fdcb377335fbced2ac54640fee072c97b39d7fe37e669c847c035f5b98ab1bce01409905c709b59d9e5eb85320b54109f5f3e47cf7b80
7
+ data.tar.gz: ccf705d91b9bc8189844d4d831a981ecf16492c8236c51cb24c01944499802dce02f4198f2ffda3799b1d813865edf3ecf1426a5b6f2ddee9d1c7c7ee07362e9
data/Gemfile.lock CHANGED
@@ -7,7 +7,7 @@ GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  bacon (1.2.0)
10
- rake (10.3.2)
10
+ rake (11.3.0)
11
11
  unicode_utils (1.4.0)
12
12
 
13
13
  PLATFORMS
@@ -443,19 +443,19 @@ module TracWiki
443
443
  attrs.strip.split(/\s*,\s*/).each do |opt|
444
444
  case opt
445
445
  when /^\d+[^\d]*$/
446
- a['width'] = escape_url(opt)
446
+ a['width'] = opt
447
447
  when /^(right|left|center)/i
448
- a['align'] = escape_url(opt)
448
+ a['align'] = opt
449
449
  when /^(top|bottom|middle)$/i
450
- a['valign'] = escape_url(opt)
450
+ a['valign'] = opt
451
451
  when /^link=(.*)$/i
452
- a['link'] = escape_url($1)
452
+ a['link'] = $1
453
453
  when /^nolink$/i
454
454
  # pass
455
455
  when /^(align|valign|border|width|height|alt|title|longdesc|class|id|usemap)=(.*)$/i
456
- a[$1]= escape_url($2)
456
+ a[$1]= $2
457
457
  when /^(margin|margin-(left|right|top|bottom))=(\d+)$/
458
- style.push($1 + ':' + escape_url($3))
458
+ style.push($1 + ':' + $3)
459
459
  end
460
460
  end
461
461
  a[:style] = style.join(';') if ! style.empty?
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.3.32'
2
+ VERSION = '0.3.33'
3
3
  end
data/test/parser_test.rb CHANGED
@@ -607,10 +607,11 @@ describe TracWiki::Parser do
607
607
  tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]")
608
608
  tc("<p><img src=\"/ahoj/bhoj/bla/image.jpg\"/></p>\n", "[[Image(bla/image.jpg)]]", :base => "/ahoj/bhoj", :no_escape => true)
609
609
  tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]", :no_link=>true)
610
- tc("<p><img alt=\"a%22tag%22\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]")
611
- tc("<p><img alt=\"a%22tag%22\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]", :no_link=>true)
612
- tc("<p><a href=\"ahoj\"><img alt=\"a%22tag%22\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj)]]", :no_link=>true)
613
- tc("<p><a href=\"javascript%253Aalert%2528666%2529\"><img alt=\"a%22tag%22\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=javascript:alert(666))]]", :no_link=>true)
610
+ tc("<p><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]")
611
+ tc("<p><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]", :no_link=>true)
612
+ tc("<p><a href=\"ahoj\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj)]]", :no_link=>true)
613
+ tc("<p><a href=\"ahoj/bhoj\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj/bhoj)]]", :no_escape => true, :no_link=>true)
614
+ tc("<p><a href=\"javascript%3Aalert%28666%29\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=javascript:alert(666))]]", :no_link=>true)
614
615
 
615
616
  # Malicious links should not be converted.
616
617
  tc("<p><a href=\"javascript%3Aalert%28%22Boo%21%22%29\">Click</a></p>\n", "[[javascript:alert(\"Boo!\")|Click]]")
@@ -884,7 +885,7 @@ describe TracWiki::Parser do
884
885
  tc("<p><img src=\"image.jpg\" valign=\"middle\"/></p>\n", "[[Image(image.jpg, middle)]]")
885
886
  tc("<p><img src=\"image.jpg\" title=\"houhouhou\"/></p>\n", "[[Image(image.jpg, title=houhouhou)]]")
886
887
  tc("<p><img src=\"image.jpg\" width=\"120px\"/></p>\n", "[[Image(image.jpg,width=120px)]]")
887
- tc("<p><img src=\"image.jpg\" width=\"120%25\"/></p>\n", "[[Image(image.jpg, width=120%)]]")
888
+ tc("<p><img src=\"image.jpg\" width=\"120%\"/></p>\n", "[[Image(image.jpg, width=120%)]]")
888
889
  tc("<p><img src=\"image.jpg\" style=\"margin:5\"/></p>\n", "[[Image(image.jpg,margin=5)]]")
889
890
  tc("<p><img src=\"http://example.org/image.jpg\"/></p>\n", "[[Image(http://example.org/image.jpg)]]")
890
891
  end
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.3.32
4
+ version: 0.3.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitas Stradal