commonmarker 0.16.5 → 0.16.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of commonmarker might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/commonmarker/cmark/CMakeLists.txt +1 -1
- data/ext/commonmarker/cmark/changelog.txt +5 -0
- data/ext/commonmarker/cmark/extensions/tagfilter.c +2 -1
- data/ext/commonmarker/cmark/src/arena.c +7 -2
- data/ext/commonmarker/cmark/src/commonmark.c +1 -1
- data/ext/commonmarker/cmark/src/inlines.c +2 -1
- data/ext/commonmarker/cmark/test/spec.txt +2 -2
- data/ext/commonmarker/cmark/tools/Dockerfile +2 -0
- data/lib/commonmarker/renderer.rb +1 -1
- data/lib/commonmarker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6cd6cd50f6bdf18dc0107cd9201924ad1d8427
|
4
|
+
data.tar.gz: 3a23e9ac4f92a454b57b1599df3935d41f0c6cc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda57d46d1f05d1ed4eec74507dd0a676688f3cabfa498e88a6a9f7f19c4cb508925cf338cc6545b9e3be9af897efda9c087e1215abc44928d60ab2bc72347fa
|
7
|
+
data.tar.gz: 4273d4afbf96a6b3f040a68ab30f50b503504fa48f2aee0a0124f0e4dc18141d24411ba2c507f93a671561bf0d363f0c96ccf106f80253ae6562b080bc71b733
|
@@ -19,7 +19,7 @@ set(PROJECT_NAME "cmark")
|
|
19
19
|
set(PROJECT_VERSION_MAJOR 0)
|
20
20
|
set(PROJECT_VERSION_MINOR 27)
|
21
21
|
set(PROJECT_VERSION_PATCH 1)
|
22
|
-
set(PROJECT_VERSION_GFM
|
22
|
+
set(PROJECT_VERSION_GFM 3)
|
23
23
|
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM} )
|
24
24
|
|
25
25
|
option(CMARK_TESTS "Build cmark tests and enable testing" ON)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#include "tagfilter.h"
|
2
2
|
#include <parser.h>
|
3
|
+
#include <ctype.h>
|
3
4
|
|
4
5
|
static const char *blacklist[] = {
|
5
6
|
"title", "textarea", "style", "xmp", "iframe",
|
@@ -23,7 +24,7 @@ static int is_tag(const unsigned char *tag_data, size_t tag_size,
|
|
23
24
|
if (*tagname == 0)
|
24
25
|
break;
|
25
26
|
|
26
|
-
if (tag_data[i] != *tagname)
|
27
|
+
if (tolower(tag_data[i]) != *tagname)
|
27
28
|
return 0;
|
28
29
|
}
|
29
30
|
|
@@ -62,6 +62,12 @@ static void *arena_calloc(size_t nmem, size_t size) {
|
|
62
62
|
init_arena();
|
63
63
|
|
64
64
|
size_t sz = nmem * size + sizeof(size_t);
|
65
|
+
|
66
|
+
// Round allocation sizes to largest integer size to
|
67
|
+
// ensure returned memory is correctly aligned
|
68
|
+
const size_t align = sizeof(size_t) - 1;
|
69
|
+
sz = (sz + align) & ~align;
|
70
|
+
|
65
71
|
if (sz > A->sz) {
|
66
72
|
A->prev = alloc_arena_chunk(sz, A->prev);
|
67
73
|
return (uint8_t *) A->prev->ptr + sizeof(size_t);
|
@@ -71,8 +77,7 @@ static void *arena_calloc(size_t nmem, size_t size) {
|
|
71
77
|
}
|
72
78
|
void *ptr = (uint8_t *) A->ptr + A->used;
|
73
79
|
A->used += sz;
|
74
|
-
size_t
|
75
|
-
memcpy(ptr, &new_sz, sizeof(new_sz));
|
80
|
+
*((size_t *) ptr) = sz - sizeof(size_t);
|
76
81
|
return (uint8_t *) ptr + sizeof(size_t);
|
77
82
|
}
|
78
83
|
|
@@ -106,7 +106,8 @@ static cmark_chunk chunk_clone(cmark_mem *mem, cmark_chunk *src) {
|
|
106
106
|
c.len = len;
|
107
107
|
c.data = (unsigned char *)mem->calloc(len + 1, 1);
|
108
108
|
c.alloc = 1;
|
109
|
-
|
109
|
+
if (len)
|
110
|
+
memcpy(c.data, src->data, len);
|
110
111
|
c.data[len] = '\0';
|
111
112
|
|
112
113
|
return c;
|
@@ -9285,12 +9285,12 @@ All other HTML tags are left untouched.
|
|
9285
9285
|
<strong> <title> <style> <em>
|
9286
9286
|
|
9287
9287
|
<blockquote>
|
9288
|
-
<xmp> is disallowed.
|
9288
|
+
<xmp> is disallowed. <XMP> is also disallowed.
|
9289
9289
|
</blockquote>
|
9290
9290
|
.
|
9291
9291
|
<p><strong> <title> <style> <em></p>
|
9292
9292
|
<blockquote>
|
9293
|
-
<xmp> is disallowed.
|
9293
|
+
<xmp> is disallowed. <XMP> is also disallowed.
|
9294
9294
|
</blockquote>
|
9295
9295
|
````````````````````````````````
|
9296
9296
|
|
data/lib/commonmarker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmarker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-enum
|