redcarpet 1.12.1 → 1.12.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of redcarpet might be problematic. Click here for more details.

data/ext/xhtml.c CHANGED
@@ -437,23 +437,20 @@ static int
437
437
  rndr_raw_html(struct buf *ob, struct buf *text, void *opaque)
438
438
  {
439
439
  struct xhtml_renderopt *options = opaque;
440
- int escape_html = 0;
441
440
 
442
- if ((options->flags & XHTML_SKIP_STYLE) != 0 && is_html_tag(text, "style"))
443
- escape_html = 1;
441
+ if ((options->flags & XHTML_SKIP_HTML) != 0)
442
+ return 1;
444
443
 
445
- else if ((options->flags & XHTML_SKIP_LINKS) != 0 && is_html_tag(text, "a"))
446
- escape_html = 1;
444
+ if ((options->flags & XHTML_SKIP_STYLE) != 0 && is_html_tag(text, "style"))
445
+ return 1;
447
446
 
448
- else if ((options->flags & XHTML_SKIP_IMAGES) != 0 && is_html_tag(text, "img"))
449
- escape_html = 1;
447
+ if ((options->flags & XHTML_SKIP_LINKS) != 0 && is_html_tag(text, "a"))
448
+ return 1;
450
449
 
450
+ if ((options->flags & XHTML_SKIP_IMAGES) != 0 && is_html_tag(text, "img"))
451
+ return 1;
451
452
 
452
- if (escape_html)
453
- attr_escape(ob, text->data, text->size);
454
- else
455
- bufput(ob, text->data, text->size);
456
-
453
+ bufput(ob, text->data, text->size);
457
454
  return 1;
458
455
  }
459
456
 
@@ -785,10 +782,8 @@ ups_xhtml_renderer(struct mkd_renderer *renderer, unsigned int render_flags)
785
782
  renderer->autolink = NULL;
786
783
  }
787
784
 
788
- if (render_flags & XHTML_SKIP_HTML) {
789
- renderer->raw_html_tag = NULL;
785
+ if (render_flags & XHTML_SKIP_HTML)
790
786
  renderer->blockhtml = NULL;
791
- }
792
787
 
793
788
  if (render_flags & XHTML_SMARTYPANTS)
794
789
  renderer->normal_text = rndr_smartypants;
data/lib/redcarpet.rb CHANGED
@@ -26,7 +26,7 @@
26
26
  # end
27
27
  #
28
28
  class Redcarpet
29
- VERSION = '1.12.1'
29
+ VERSION = '1.12.2'
30
30
 
31
31
  # Original Markdown formatted text.
32
32
  attr_reader :text
data/redcarpet.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'redcarpet'
3
- s.version = '1.12.1'
3
+ s.version = '1.12.2'
4
4
  s.summary = "Ruby bindings for libupskirt"
5
5
  s.description = 'A fast and safe Markdown to (X)HTML parser'
6
6
  s.date = '2011-05-01'
@@ -42,7 +42,7 @@ class MarkdownTest < Test::Unit::TestCase
42
42
 
43
43
  def test_that_filter_html_works
44
44
  markdown = Markdown.new('Through <em>NO</em> <script>DOUBLE NO</script>', :filter_html)
45
- html_equal "<p>Through &lt;em>NO&lt;/em> &lt;script>DOUBLE NO&lt;/script></p>", markdown.to_html.strip
45
+ html_equal "<p>Through NO DOUBLE NO</p>", markdown.to_html.strip
46
46
  end
47
47
 
48
48
  def test_that_bluecloth_restrictions_are_supported
metadata CHANGED
@@ -1,13 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcarpet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 12
9
- - 1
10
- version: 1.12.1
4
+ version: 1.12.2
11
5
  platform: ruby
12
6
  authors:
13
7
  - "Natacha Port\xC3\xA9"
@@ -60,27 +54,21 @@ rdoc_options: []
60
54
  require_paths:
61
55
  - lib
62
56
  required_ruby_version: !ruby/object:Gem::Requirement
63
- none: false
64
57
  requirements:
65
58
  - - ">="
66
59
  - !ruby/object:Gem::Version
67
- hash: 3
68
- segments:
69
- - 0
70
60
  version: "0"
61
+ version:
71
62
  required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
63
  requirements:
74
64
  - - ">="
75
65
  - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
66
  version: "0"
67
+ version:
80
68
  requirements: []
81
69
 
82
70
  rubyforge_project:
83
- rubygems_version: 1.3.7
71
+ rubygems_version: 1.3.5
84
72
  signing_key:
85
73
  specification_version: 3
86
74
  summary: Ruby bindings for libupskirt