trac-wiki 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -204,9 +204,9 @@ module TracWiki
204
204
  # to put divs around the imgs.
205
205
  def make_image(uri, alt='')
206
206
  if alt
207
- "<img src='" << escape_html(uri) << "' alt='" << escape_html(alt) << "'/>"
207
+ "<img src=\"" << escape_html(uri) << "\" alt=\"" << escape_html(alt) << "\"/>"
208
208
  else
209
- "<img src='" << escape_html(uri) << "'/>"
209
+ "<img src=\"" << escape_html(uri) << "\"/>"
210
210
  end
211
211
  end
212
212
 
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
data/test/parser_test.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'trac_wiki'
1
+ require 'trac-wiki'
2
2
 
3
3
  class Bacon::Context
4
4
  def tc(html, wiki, options = {})
@@ -433,8 +433,8 @@ describe TracWiki::Parser do
433
433
  tc("<p>&lt;b&gt;not bold&lt;/b&gt;</p>\n", "<b>not bold</b>")
434
434
 
435
435
  # Image tags should be escape
436
- tc("<p><img src='image.jpg'/></p>\n", "[[Image(image.jpg)]]")
437
- tc("<p><img src='image.jpg' alt='&quot;tag&quot;'/></p>\n", "[[Image(image.jpg|\"tag\")]]")
436
+ tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]")
437
+ tc("<p><img src=\"image.jpg\" alt=\"&quot;tag&quot;\"/></p>\n", "[[Image(image.jpg|\"tag\")]]")
438
438
 
439
439
  # Malicious links should not be converted.
440
440
  tc("<p><a href=\"javascript%3Aalert%28%22Boo%21%22%29\">Click</a></p>\n", "[[javascript:alert(\"Boo!\")|Click]]")
@@ -509,7 +509,7 @@ describe TracWiki::Parser do
509
509
  # Equal sign after pipe make a header
510
510
  tc "<table><tr><th>Header</th></tr></table>", "||=Header=||"
511
511
 
512
- tc "<table><tr><td>c1</td><td><a href=\"Link\">Link text</a></td><td><img src='Image'/></td></tr></table>", "||c1||[[Link|Link text]]||[[Image(Image)]]||"
512
+ tc "<table><tr><td>c1</td><td><a href=\"Link\">Link text</a></td><td><img src=\"Image\"/></td></tr></table>", "||c1||[[Link|Link text]]||[[Image(Image)]]||"
513
513
  end
514
514
 
515
515
  it 'should parse following table' do
@@ -684,9 +684,9 @@ describe TracWiki::Parser do
684
684
  end
685
685
 
686
686
  it 'should parse image' do
687
- tc("<p><img src='image.jpg'/></p>\n", "[[Image(image.jpg)]]")
688
- tc("<p><img src='image.jpg' alt='tag'/></p>\n", "[[Image(image.jpg|tag)]]")
689
- tc("<p><img src='http://example.org/image.jpg'/></p>\n", "[[Image(http://example.org/image.jpg)]]")
687
+ tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]")
688
+ tc("<p><img src=\"image.jpg\" alt=\"tag\"/></p>\n", "[[Image(image.jpg|tag)]]")
689
+ tc("<p><img src=\"http://example.org/image.jpg\"/></p>\n", "[[Image(http://example.org/image.jpg)]]")
690
690
  end
691
691
 
692
692
  it 'should parse bold combo' do
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.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-24 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon