redcarpet 3.5.0 → 3.5.1
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 +4 -4
- data/ext/redcarpet/html.c +8 -1
- data/lib/redcarpet.rb +1 -1
- data/redcarpet.gemspec +2 -2
- data/test/markdown_test.rb +10 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e6ea78031a1e40620168cd57fcbfae06bec5bafabc8f6e600adc552a4fe5b40
|
4
|
+
data.tar.gz: 658dd33e836daa11effa88e0491d09387963ea349751efd278e9fbdac7026066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b17b0208c25d4e8566fb4a154d0f66e778b702abcf58d1d1227fa2510be421c7496e20fd6402066adba3485778e935b46aff73fd412802eedb89e44470a7ad94
|
7
|
+
data.tar.gz: 1e1c8dd559979b8bd5f4de2d20e1127b2a964c03a267133c3d9a3703f71bce44a2f4dc2efdb0dc0cc331e0ab779bfad23e9b62af0ffc4ee9078896376bd86865
|
data/ext/redcarpet/html.c
CHANGED
@@ -255,8 +255,15 @@ rndr_quote(struct buf *ob, const struct buf *text, void *opaque)
|
|
255
255
|
if (!text || !text->size)
|
256
256
|
return 0;
|
257
257
|
|
258
|
+
struct html_renderopt *options = opaque;
|
259
|
+
|
258
260
|
BUFPUTSL(ob, "<q>");
|
259
|
-
|
261
|
+
|
262
|
+
if (options->flags & HTML_ESCAPE)
|
263
|
+
escape_html(ob, text->data, text->size);
|
264
|
+
else
|
265
|
+
bufput(ob, text->data, text->size);
|
266
|
+
|
260
267
|
BUFPUTSL(ob, "</q>");
|
261
268
|
|
262
269
|
return 1;
|
data/lib/redcarpet.rb
CHANGED
data/redcarpet.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'redcarpet'
|
4
|
-
s.version = '3.5.
|
4
|
+
s.version = '3.5.1'
|
5
5
|
s.summary = "Markdown that smells nice"
|
6
6
|
s.description = 'A fast, safe and extensible Markdown to (X)HTML parser'
|
7
|
-
s.date = '
|
7
|
+
s.date = '2020-12-15'
|
8
8
|
s.email = 'vicent@github.com'
|
9
9
|
s.homepage = 'http://github.com/vmg/redcarpet'
|
10
10
|
s.authors = ["Natacha Porté", "Vicent Martí"]
|
data/test/markdown_test.rb
CHANGED
@@ -220,6 +220,16 @@ class MarkdownTest < Redcarpet::TestCase
|
|
220
220
|
assert_equal '<p>this is a <q>quote</q></p>', output
|
221
221
|
end
|
222
222
|
|
223
|
+
def test_quote_flag_honors_escape_html
|
224
|
+
text = 'We are not "<svg/onload=pwned>"'
|
225
|
+
|
226
|
+
output_enabled = render(text, with: [:quote, :escape_html])
|
227
|
+
output_disabled = render(text, with: [:quote])
|
228
|
+
|
229
|
+
assert_equal "<p>We are not <q><svg/onload=pwned></q></p>", output_enabled
|
230
|
+
assert_equal "<p>We are not <q><svg/onload=pwned></q></p>", output_disabled
|
231
|
+
end
|
232
|
+
|
223
233
|
def test_that_fenced_flag_works
|
224
234
|
text = <<-fenced.strip_heredoc
|
225
235
|
This is a simple test
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redcarpet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natacha Porté
|
8
8
|
- Vicent Martí
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -111,7 +111,7 @@ homepage: http://github.com/vmg/redcarpet
|
|
111
111
|
licenses:
|
112
112
|
- MIT
|
113
113
|
metadata: {}
|
114
|
-
post_install_message:
|
114
|
+
post_install_message:
|
115
115
|
rdoc_options: []
|
116
116
|
require_paths:
|
117
117
|
- lib
|
@@ -126,8 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
130
|
-
signing_key:
|
129
|
+
rubygems_version: 3.1.4
|
130
|
+
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Markdown that smells nice
|
133
133
|
test_files:
|