nokogiri 1.8.1-java → 1.8.2-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.cross_rubies +2 -0
- data/CHANGELOG.md +26 -0
- data/Gemfile +2 -2
- data/Manifest.txt +3 -0
- data/Rakefile +4 -7
- data/appveyor.yml +18 -13
- data/build_all +1 -1
- data/dependencies.yml +23 -23
- data/ext/java/nokogiri/internals/NokogiriHandler.java +26 -28
- data/ext/nokogiri/extconf.rb +5 -2
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml.rb +1 -0
- data/lib/nokogiri/xml/entity_reference.rb +18 -0
- data/lib/nokogiri/xml/node.rb +1 -3
- data/test/helper.rb +80 -0
- data/test/html/sax/test_parser_text.rb +163 -0
- data/test/html/test_node_encoding.rb +6 -0
- data/test/xml/sax/test_parser_text.rb +202 -0
- data/test/xml/test_entity_reference.rb +11 -0
- data/test/xml/test_node_encoding.rb +6 -0
- metadata +44 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 23422f6678062a871c836fd2b844d8b286a682eb4b261285e969c9a7d44fa555
|
4
|
+
data.tar.gz: 7f5a130b02e476899204ae9f04d7761de8c24ea9d8b9b4f3fb044e09229de67e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 067c096637dcee08715b39429bd362c020cc00bce7e7a4f24eedcea4935f7e91e6abdfb545463963e29853acd5d7c56f4df1062d5463e8952b9fe4892b9d42ec
|
7
|
+
data.tar.gz: 72dcc24e197b347240b9c88d694151eee14f9480505e889d585407e91a20a4c3128a9a0d948a277246149153bb2d219bbd12cbf89a8f9c04e50000d8f38476da
|
data/.cross_rubies
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
# 1.8.2 / 2018-01-29
|
2
|
+
|
3
|
+
## Security Notes
|
4
|
+
|
5
|
+
[MRI] The update of vendored libxml2 from 2.9.5 to 2.9.7 addresses at least one published vulnerability, CVE-2017-15412. [#1714 has complete details]
|
6
|
+
|
7
|
+
|
8
|
+
## Dependencies
|
9
|
+
|
10
|
+
* [MRI] libxml2 is updated from 2.9.5 to 2.9.7
|
11
|
+
* [MRI] libxml2 is updated from 1.1.30 to 1.1.32
|
12
|
+
|
13
|
+
|
14
|
+
## Features
|
15
|
+
|
16
|
+
* [MRI] OpenBSD installation should be a bit easier now. [#1685] (Thanks, @jeremyevans!)
|
17
|
+
* [MRI] Cross-built Windows gems now support Ruby 2.5
|
18
|
+
|
19
|
+
|
20
|
+
## Bug fixes
|
21
|
+
|
22
|
+
* Node#serialize once again returns UTF-8-encoded strings. [#1659]
|
23
|
+
* [JRuby] made SAX parsing of characters consistent with C implementation [#1676] (Thanks, @andrew-aladev!)
|
24
|
+
* [MRI] Predefined entities, when inspected, no longer cause a segfault. [#1238]
|
25
|
+
|
26
|
+
|
1
27
|
# 1.8.1 / 2017-09-19
|
2
28
|
|
3
29
|
## Dependencies
|
data/Gemfile
CHANGED
@@ -13,10 +13,10 @@ gem "hoe-git", "~>1.6", :group => [:development, :test]
|
|
13
13
|
gem "minitest", "~>5.8.4", :group => [:development, :test]
|
14
14
|
gem "rake", "~>12.0", :group => [:development, :test]
|
15
15
|
gem "rake-compiler", "~>1.0.3", :group => [:development, :test]
|
16
|
-
gem "rake-compiler-dock", "~>0.6.
|
16
|
+
gem "rake-compiler-dock", "~>0.6.2", :group => [:development, :test]
|
17
17
|
gem "racc", "~>1.4.14", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw]
|
18
18
|
gem "rexical", "~>1.0.5", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw]
|
19
|
-
gem "concourse", "~>0.
|
19
|
+
gem "concourse", "~>0.15", :group => [:development, :test]
|
20
20
|
gem "rdoc", "~>4.0", :group => [:development, :test]
|
21
21
|
gem "hoe", "~>3.16", :group => [:development, :test]
|
22
22
|
|
data/Manifest.txt
CHANGED
@@ -217,6 +217,7 @@ lib/nokogiri/xml/dtd.rb
|
|
217
217
|
lib/nokogiri/xml/element_content.rb
|
218
218
|
lib/nokogiri/xml/element_decl.rb
|
219
219
|
lib/nokogiri/xml/entity_decl.rb
|
220
|
+
lib/nokogiri/xml/entity_reference.rb
|
220
221
|
lib/nokogiri/xml/namespace.rb
|
221
222
|
lib/nokogiri/xml/node.rb
|
222
223
|
lib/nokogiri/xml/node/save_options.rb
|
@@ -297,6 +298,7 @@ test/files/xinclude.xml
|
|
297
298
|
test/helper.rb
|
298
299
|
test/html/sax/test_parser.rb
|
299
300
|
test/html/sax/test_parser_context.rb
|
301
|
+
test/html/sax/test_parser_text.rb
|
300
302
|
test/html/sax/test_push_parser.rb
|
301
303
|
test/html/test_builder.rb
|
302
304
|
test/html/test_document.rb
|
@@ -324,6 +326,7 @@ test/xml/node/test_save_options.rb
|
|
324
326
|
test/xml/node/test_subclass.rb
|
325
327
|
test/xml/sax/test_parser.rb
|
326
328
|
test/xml/sax/test_parser_context.rb
|
329
|
+
test/xml/sax/test_parser_text.rb
|
327
330
|
test/xml/sax/test_push_parser.rb
|
328
331
|
test/xml/test_attr.rb
|
329
332
|
test/xml/test_attribute_decl.rb
|
data/Rakefile
CHANGED
@@ -137,10 +137,10 @@ HOE = Hoe.spec 'nokogiri' do
|
|
137
137
|
["minitest", "~> 5.8.4"],
|
138
138
|
["rake", "~> 12.0"],
|
139
139
|
["rake-compiler", "~> 1.0.3"],
|
140
|
-
["rake-compiler-dock", "~> 0.6.
|
140
|
+
["rake-compiler-dock", "~> 0.6.2"],
|
141
141
|
["racc", "~> 1.4.14"],
|
142
142
|
["rexical", "~> 1.0.5"],
|
143
|
-
["concourse", "~> 0.
|
143
|
+
["concourse", "~> 0.15"],
|
144
144
|
]
|
145
145
|
|
146
146
|
if java?
|
@@ -264,10 +264,7 @@ task 'bundler:gemfile' do
|
|
264
264
|
end
|
265
265
|
|
266
266
|
file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t|
|
267
|
-
racc
|
268
|
-
racc = "#{::RbConfig::CONFIG['bindir']}/racc" if racc.empty?
|
269
|
-
racc = %x{command -v racc}.strip if racc.empty?
|
270
|
-
sh "#{racc} -l -o #{t.name} #{t.prerequisites.first}"
|
267
|
+
sh "racc -l -o #{t.name} #{t.prerequisites.first}"
|
271
268
|
end
|
272
269
|
|
273
270
|
file GENERATED_TOKENIZER => "lib/nokogiri/css/tokenizer.rex" do |t|
|
@@ -303,7 +300,7 @@ if java?
|
|
303
300
|
end
|
304
301
|
end
|
305
302
|
|
306
|
-
Rake::Task[:test].prerequisites << :compile
|
303
|
+
# Rake::Task[:test].prerequisites << :compile
|
307
304
|
Rake::Task[:test].prerequisites << :java_debug
|
308
305
|
Rake::Task[:test].prerequisites << :check_extra_deps unless java?
|
309
306
|
|
data/appveyor.yml
CHANGED
@@ -1,24 +1,29 @@
|
|
1
1
|
install:
|
2
|
-
- SET PATH=C:\
|
3
|
-
-
|
4
|
-
|
2
|
+
- SET PATH=C:\ruby%ruby_version%\bin;%PATH%
|
3
|
+
- ps: |
|
4
|
+
if ($env:ruby_version -like "*head*") {
|
5
|
+
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe")
|
6
|
+
cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version
|
7
|
+
}
|
5
8
|
- ruby --version
|
6
9
|
- gem --version
|
10
|
+
- gem install bundler --conservative
|
7
11
|
- bundle install
|
8
12
|
|
9
13
|
build: off
|
10
14
|
|
11
15
|
test_script:
|
12
|
-
- bundle exec rake
|
16
|
+
- bundle exec rake -rdevkit
|
13
17
|
|
14
18
|
environment:
|
15
19
|
matrix:
|
16
|
-
- ruby_version:
|
17
|
-
- ruby_version:
|
18
|
-
- ruby_version:
|
19
|
-
- ruby_version:
|
20
|
-
- ruby_version:
|
21
|
-
- ruby_version:
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
- ruby_version: head-x64
|
21
|
+
- ruby_version: 24
|
22
|
+
- ruby_version: 23-x64
|
23
|
+
- ruby_version: 22
|
24
|
+
- ruby_version: 21-x64
|
25
|
+
- ruby_version: 200
|
26
|
+
|
27
|
+
matrix:
|
28
|
+
allow_failures:
|
29
|
+
- ruby_version: head
|
data/build_all
CHANGED
data/dependencies.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
libxml2:
|
2
|
-
version: "2.9.
|
3
|
-
sha256: "
|
2
|
+
version: "2.9.7"
|
3
|
+
sha256: "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
|
4
4
|
# manually verified checksum:
|
5
5
|
#
|
6
|
-
# $ gpg --verify libxml2-2.9.
|
7
|
-
# gpg: Signature made
|
6
|
+
# $ gpg --verify libxml2-2.9.7.tar.gz.asc libxml2-2.9.7.tar.gz
|
7
|
+
# gpg: Signature made Thu 02 Nov 2017 04:17:54 PM EDT using RSA key ID 596BEA5D
|
8
8
|
# gpg: Good signature from "Daniel Veillard (Red Hat work email) <veillard@redhat.com>"
|
9
9
|
# gpg: aka "Daniel Veillard <Daniel.Veillard@w3.org>"
|
10
10
|
# gpg: WARNING: This key is not certified with a trusted signature!
|
@@ -13,25 +13,25 @@ libxml2:
|
|
13
13
|
# Subkey fingerprint: DB46 681B B91A DCEA 170F A2D4 1558 8B26 596B EA5D
|
14
14
|
#
|
15
15
|
# using this pgp signature:
|
16
|
-
#
|
17
16
|
# -----BEGIN PGP SIGNATURE-----
|
18
17
|
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# =
|
18
|
+
# iQEcBAABAgAGBQJZ+31yAAoJEBVYiyZZa+pd+MMH/RTsPCo8CegAHsSUlNCae2Ay
|
19
|
+
# HpM6J7sNWs0b2xwaYRtwhewJ5z/rsCcM5nn7MeGiU8dX7W5MKF69uGXUywufRxzO
|
20
|
+
# GFoQSxO0a1z5mtGu7jC/W6DTYHFBeOJcEfMa3zUZjZ0RXqrENRhX55okse4pJPmG
|
21
|
+
# dWQphbu9G3qoCuWD7QpyI7Mjhjemmyi4Ai/4vJPO8WtB7VDfdtpuZFVCRLG2cp0X
|
22
|
+
# 90SZde+0oWJcN8oIG3FaTd7O4OuJPAceqNhTvF90dLvqSqRBd0RqZNnjYNYZ6uRy
|
23
|
+
# FQSlQBVCxdLY0AI7Yooq79TJD+0vcqiQNwQwH7L+hBWgvPos4DKN1M9LaJc/RTk=
|
24
|
+
# =5Qzo
|
26
25
|
# -----END PGP SIGNATURE-----
|
26
|
+
#
|
27
27
|
|
28
28
|
libxslt:
|
29
|
-
version: "1.1.
|
30
|
-
sha256: "
|
29
|
+
version: "1.1.32"
|
30
|
+
sha256: "526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460"
|
31
31
|
# manually verified checksum:
|
32
32
|
#
|
33
|
-
# $ gpg --verify libxslt-1.1.
|
34
|
-
# gpg: Signature made
|
33
|
+
# $ gpg --verify libxslt-1.1.32.tar.gz.asc libxslt-1.1.32.tar.gz
|
34
|
+
# gpg: Signature made Thu 02 Nov 2017 04:35:04 PM EDT using RSA key ID 596BEA5D
|
35
35
|
# gpg: Good signature from "Daniel Veillard (Red Hat work email) <veillard@redhat.com>"
|
36
36
|
# gpg: aka "Daniel Veillard <Daniel.Veillard@w3.org>"
|
37
37
|
# gpg: WARNING: This key is not certified with a trusted signature!
|
@@ -43,13 +43,13 @@ libxslt:
|
|
43
43
|
#
|
44
44
|
# -----BEGIN PGP SIGNATURE-----
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# =
|
46
|
+
# iQEcBAABAgAGBQJZ+4F4AAoJEBVYiyZZa+pdy1IIAMX1DpzYGdnv6GCPSKeZ0woD
|
47
|
+
# sHmSkygJep0/sUQD1cYunNsNZnGDgWhnsLAvHOn3opJgsiaZhmhJ8Uo7QNlT+ni1
|
48
|
+
# AvRFgQoSXLWSF5kkun4u7RvnpDI6jYfCuYSwb9SO4EAYFAQQJXQaKCeFq71gad+p
|
49
|
+
# XGHJFAy2TqUVLNZ5I1mQz/oBeDsJ7RzHpYqaBxsLDqrCzRQ9ai23q+dFGS3jvLBr
|
50
|
+
# 0gXw0MK73ceOwW12L5aLj4erNbATWmMFMDYZZwftysv3bgx2YfiOoZUTzufrB/Bc
|
51
|
+
# MG8hP76aYBwIKNbhiDFGa2qdHGZGF7YQ4mi1/ZDX1K1G2tKKeEYxscM13JwiGb8=
|
52
|
+
# =NuQO
|
53
53
|
# -----END PGP SIGNATURE-----
|
54
54
|
#
|
55
55
|
|
@@ -17,10 +17,10 @@
|
|
17
17
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
18
18
|
* permit persons to whom the Software is furnished to do so, subject to
|
19
19
|
* the following conditions:
|
20
|
-
*
|
20
|
+
*
|
21
21
|
* The above copyright notice and this permission notice shall be
|
22
22
|
* included in all copies or substantial portions of the Software.
|
23
|
-
*
|
23
|
+
*
|
24
24
|
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
25
25
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
26
26
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
@@ -38,7 +38,6 @@ import static nokogiri.internals.NokogiriHelpers.isNamespace;
|
|
38
38
|
import static nokogiri.internals.NokogiriHelpers.stringOrNil;
|
39
39
|
|
40
40
|
import java.util.LinkedList;
|
41
|
-
import java.util.Stack;
|
42
41
|
|
43
42
|
import nokogiri.XmlSyntaxError;
|
44
43
|
|
@@ -57,12 +56,12 @@ import org.xml.sax.ext.DefaultHandler2;
|
|
57
56
|
|
58
57
|
/**
|
59
58
|
* A handler for SAX parsing.
|
60
|
-
*
|
59
|
+
*
|
61
60
|
* @author sergio
|
62
61
|
* @author Yoko Harada <yokolet@gmail.com>
|
63
62
|
*/
|
64
63
|
public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
65
|
-
|
64
|
+
StringBuilder charactersBuilder;
|
66
65
|
private final Ruby ruby;
|
67
66
|
private final RubyClass attrClass;
|
68
67
|
private final IRubyObject object;
|
@@ -100,7 +99,7 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
100
99
|
@Override
|
101
100
|
public void startDocument() throws SAXException {
|
102
101
|
call("start_document");
|
103
|
-
|
102
|
+
charactersBuilder = new StringBuilder();
|
104
103
|
}
|
105
104
|
|
106
105
|
@Override
|
@@ -112,13 +111,7 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
112
111
|
|
113
112
|
@Override
|
114
113
|
public void endDocument() throws SAXException {
|
115
|
-
|
116
|
-
if (!characterStack.empty()) {
|
117
|
-
for (int i=0; i<characterStack.size(); i++) {
|
118
|
-
sb = characterStack.get(i);
|
119
|
-
call("characters", ruby.newString(sb.toString()));
|
120
|
-
}
|
121
|
-
}
|
114
|
+
populateCharacters();
|
122
115
|
call("end_document");
|
123
116
|
}
|
124
117
|
|
@@ -172,7 +165,7 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
172
165
|
args[1] = stringOrNil(ruby, pre);
|
173
166
|
args[2] = stringOrNil(ruby, u);
|
174
167
|
}
|
175
|
-
}
|
168
|
+
}
|
176
169
|
if (args == null) {
|
177
170
|
args = new IRubyObject[4];
|
178
171
|
args[0] = stringOrNil(ruby, ln);
|
@@ -187,34 +180,34 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
187
180
|
}
|
188
181
|
|
189
182
|
if (localName == null || localName.equals("")) localName = getLocalPart(qName);
|
183
|
+
populateCharacters();
|
190
184
|
call("start_element_namespace",
|
191
185
|
stringOrNil(ruby, localName),
|
192
186
|
rubyAttr,
|
193
187
|
stringOrNil(ruby, getPrefix(qName)),
|
194
188
|
stringOrNil(ruby, uri),
|
195
189
|
rubyNSAttr);
|
196
|
-
characterStack.push(new StringBuffer());
|
197
190
|
}
|
198
|
-
|
191
|
+
|
199
192
|
private static String[] emptyAttrs =
|
200
|
-
{"checked", "compact", "declare", "defer", "disabled", "ismap", "multiple",
|
193
|
+
{"checked", "compact", "declare", "defer", "disabled", "ismap", "multiple",
|
201
194
|
"noresize", "nohref", "noshade", "nowrap", "readonly", "selected"};
|
202
|
-
|
195
|
+
|
203
196
|
private boolean isEmptyAttr(String name) {
|
204
197
|
for (String emptyAttr : emptyAttrs) {
|
205
198
|
if (emptyAttr.equals(name)) return true;
|
206
199
|
}
|
207
200
|
return false;
|
208
201
|
}
|
209
|
-
|
202
|
+
|
210
203
|
public Integer getLine() {
|
211
204
|
return locator.getLineNumber();
|
212
205
|
}
|
213
|
-
|
206
|
+
|
214
207
|
public Integer getColumn() {
|
215
208
|
return locator.getColumnNumber() - 1;
|
216
209
|
}
|
217
|
-
|
210
|
+
|
218
211
|
private boolean isFromFragmentHandler() {
|
219
212
|
if (object != null && object instanceof RubyObject) {
|
220
213
|
RubyObject rubyObj = (RubyObject)object;
|
@@ -231,8 +224,7 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
231
224
|
|
232
225
|
@Override
|
233
226
|
public void endElement(String uri, String localName, String qName) throws SAXException {
|
234
|
-
|
235
|
-
call("characters", ruby.newString(sb.toString()));
|
227
|
+
populateCharacters();
|
236
228
|
call("end_element_namespace",
|
237
229
|
stringOrNil(ruby, localName),
|
238
230
|
stringOrNil(ruby, getPrefix(qName)),
|
@@ -241,24 +233,24 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
241
233
|
|
242
234
|
@Override
|
243
235
|
public void characters(char[] ch, int start, int length) throws SAXException {
|
244
|
-
|
245
|
-
sb.append(ch, start, length);
|
236
|
+
charactersBuilder.append(ch, start, length);
|
246
237
|
}
|
247
238
|
|
248
239
|
@Override
|
249
240
|
public void comment(char[] ch, int start, int length) throws SAXException {
|
241
|
+
populateCharacters();
|
250
242
|
call("comment", ruby.newString(new String(ch, start, length)));
|
251
243
|
}
|
252
244
|
|
253
245
|
@Override
|
254
246
|
public void startCDATA() throws SAXException {
|
255
|
-
|
247
|
+
populateCharacters();
|
256
248
|
}
|
257
249
|
|
258
250
|
@Override
|
259
251
|
public void endCDATA() throws SAXException {
|
260
|
-
|
261
|
-
|
252
|
+
call("cdata_block", ruby.newString(charactersBuilder.toString()));
|
253
|
+
charactersBuilder.setLength(0);
|
262
254
|
}
|
263
255
|
|
264
256
|
@Override
|
@@ -337,4 +329,10 @@ public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler {
|
|
337
329
|
return context.getRuntime().getNil();
|
338
330
|
}
|
339
331
|
|
332
|
+
protected void populateCharacters() {
|
333
|
+
if (charactersBuilder.length() > 0) {
|
334
|
+
call("characters", ruby.newString(charactersBuilder.toString()));
|
335
|
+
charactersBuilder.setLength(0);
|
336
|
+
}
|
337
|
+
}
|
340
338
|
}
|
data/ext/nokogiri/extconf.rb
CHANGED
@@ -393,8 +393,11 @@ when arg_config('--clean')
|
|
393
393
|
end
|
394
394
|
|
395
395
|
if openbsd? && !using_system_libraries?
|
396
|
-
ENV['CC']
|
397
|
-
|
396
|
+
if `#{ENV['CC'] || '/usr/bin/cc'} -v 2>&1` !~ /clang/
|
397
|
+
ENV['CC'] ||= find_executable('egcc') or
|
398
|
+
abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`"
|
399
|
+
end
|
400
|
+
ENV['CFLAGS'] = "#{ENV['CFLAGS']} -I /usr/local/include"
|
398
401
|
end
|
399
402
|
|
400
403
|
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
data/lib/nokogiri/nokogiri.jar
CHANGED
Binary file
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Nokogiri
|
2
|
+
module XML
|
3
|
+
class EntityReference < Nokogiri::XML::Node
|
4
|
+
def children
|
5
|
+
# libxml2 will create a malformed child node for predefined
|
6
|
+
# entities. because any use of that child is likely to cause a
|
7
|
+
# segfault, we shall pretend that it doesn't exist.
|
8
|
+
#
|
9
|
+
# see https://github.com/sparklemotion/nokogiri/issues/1238 for details
|
10
|
+
NodeSet.new(document)
|
11
|
+
end
|
12
|
+
|
13
|
+
def inspect_attributes
|
14
|
+
[:name]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/nokogiri/xml/node.rb
CHANGED
@@ -624,9 +624,7 @@ module Nokogiri
|
|
624
624
|
options[:encoding] = encoding
|
625
625
|
|
626
626
|
outstring = String.new
|
627
|
-
|
628
|
-
outstring.force_encoding(Encoding.find(encoding))
|
629
|
-
end
|
627
|
+
outstring.force_encoding(Encoding.find(encoding || 'utf-8'))
|
630
628
|
io = StringIO.new(outstring)
|
631
629
|
write_to io, options, &block
|
632
630
|
io.string
|
data/test/helper.rb
CHANGED
@@ -186,6 +186,86 @@ module Nokogiri
|
|
186
186
|
@processing_instructions << [name, content]
|
187
187
|
end
|
188
188
|
end
|
189
|
+
|
190
|
+
# This document will help us to test the strict order of items.
|
191
|
+
|
192
|
+
class DocWithOrderedItems < XML::SAX::Document
|
193
|
+
attr_reader :items
|
194
|
+
|
195
|
+
def initialize
|
196
|
+
# [
|
197
|
+
# [ :method_1, argument_1, ... ],
|
198
|
+
# [ :method_2, argument_2, ... ],
|
199
|
+
# ...
|
200
|
+
# ]
|
201
|
+
@items = Items.new
|
202
|
+
end
|
203
|
+
|
204
|
+
[
|
205
|
+
:xmldecl,
|
206
|
+
:start_document, :end_document,
|
207
|
+
:start_element, :end_element,
|
208
|
+
:start_element_namespace, :end_element_namespace,
|
209
|
+
:characters, :comment, :cdata_block,
|
210
|
+
:processing_instruction,
|
211
|
+
:error, :warning
|
212
|
+
]
|
213
|
+
.each do |name|
|
214
|
+
define_method name do |*arguments|
|
215
|
+
@items << [name, *arguments]
|
216
|
+
super *arguments
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
class Items < Array
|
221
|
+
def get_root_content root_name
|
222
|
+
items = clone
|
223
|
+
is_inside_root = false
|
224
|
+
|
225
|
+
items.select! do |item|
|
226
|
+
method_name = item[0]
|
227
|
+
element_name = item[1]
|
228
|
+
|
229
|
+
case method_name
|
230
|
+
when :start_element, :start_element_namespace
|
231
|
+
if element_name == root_name
|
232
|
+
is_inside_root = true
|
233
|
+
next false
|
234
|
+
end
|
235
|
+
|
236
|
+
when :end_element, :end_element_namespace
|
237
|
+
is_inside_root = false if element_name == root_name and is_inside_root
|
238
|
+
end
|
239
|
+
|
240
|
+
is_inside_root
|
241
|
+
end
|
242
|
+
|
243
|
+
items
|
244
|
+
end
|
245
|
+
|
246
|
+
def select_methods(names)
|
247
|
+
items = clone
|
248
|
+
|
249
|
+
items.select! do |item|
|
250
|
+
name = item[0]
|
251
|
+
names.include? name
|
252
|
+
end
|
253
|
+
|
254
|
+
items
|
255
|
+
end
|
256
|
+
|
257
|
+
def strip_text! method_names
|
258
|
+
each do |item|
|
259
|
+
method_name = item[0]
|
260
|
+
text = item[1]
|
261
|
+
|
262
|
+
text.strip! if method_names.include? method_name
|
263
|
+
end
|
264
|
+
|
265
|
+
nil
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
189
269
|
end
|
190
270
|
end
|
191
271
|
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "helper"
|
3
|
+
|
4
|
+
module Nokogiri
|
5
|
+
module HTML
|
6
|
+
module SAX
|
7
|
+
class TestParserText < Nokogiri::SAX::TestCase
|
8
|
+
def setup
|
9
|
+
super
|
10
|
+
@doc = DocWithOrderedItems.new
|
11
|
+
@parser = HTML::SAX::Parser.new @doc
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_texts_order
|
15
|
+
html = <<-eohtml
|
16
|
+
<!DOCTYPE html>
|
17
|
+
<html>
|
18
|
+
<head></head>
|
19
|
+
<body>
|
20
|
+
text 0
|
21
|
+
<p>
|
22
|
+
text 1
|
23
|
+
<span>text 2</span>
|
24
|
+
text 3
|
25
|
+
</p>
|
26
|
+
|
27
|
+
text 4
|
28
|
+
<!--
|
29
|
+
text 5
|
30
|
+
-->
|
31
|
+
|
32
|
+
<p>
|
33
|
+
<!-- text 6 -->
|
34
|
+
<span><!-- text 7 --></span>
|
35
|
+
<!-- text 8 -->
|
36
|
+
</p>
|
37
|
+
|
38
|
+
<!-- text 9 -->
|
39
|
+
</body>
|
40
|
+
</html>
|
41
|
+
eohtml
|
42
|
+
|
43
|
+
@parser.parse html
|
44
|
+
items = @doc.items.get_root_content "body"
|
45
|
+
items = items.select_methods [
|
46
|
+
:start_element, :end_element,
|
47
|
+
:characters, :comment
|
48
|
+
]
|
49
|
+
items.strip_text! [:characters, :comment]
|
50
|
+
|
51
|
+
assert_equal [
|
52
|
+
[:characters, 'text 0'],
|
53
|
+
|
54
|
+
[:start_element, 'p', []],
|
55
|
+
[:characters, 'text 1'],
|
56
|
+
|
57
|
+
[:start_element, 'span', []],
|
58
|
+
[:characters, 'text 2'],
|
59
|
+
[:end_element, 'span'],
|
60
|
+
|
61
|
+
[:characters, 'text 3'],
|
62
|
+
[:end_element, 'p'],
|
63
|
+
|
64
|
+
[:characters, 'text 4'],
|
65
|
+
[:comment, 'text 5'],
|
66
|
+
[:characters, ''],
|
67
|
+
|
68
|
+
[:start_element, 'p', []],
|
69
|
+
[:characters, ''],
|
70
|
+
[:comment, 'text 6'],
|
71
|
+
[:characters, ''],
|
72
|
+
|
73
|
+
[:start_element, 'span', []],
|
74
|
+
[:comment, 'text 7'],
|
75
|
+
[:end_element, 'span'],
|
76
|
+
[:characters, ''],
|
77
|
+
|
78
|
+
[:comment, 'text 8'],
|
79
|
+
[:characters, ''],
|
80
|
+
[:end_element, 'p'],
|
81
|
+
[:characters, ''],
|
82
|
+
|
83
|
+
[:comment, 'text 9'],
|
84
|
+
[:characters, '']
|
85
|
+
], items
|
86
|
+
|
87
|
+
nil
|
88
|
+
end
|
89
|
+
|
90
|
+
def text_whitespace
|
91
|
+
html = <<-eohtml
|
92
|
+
<!DOCTYPE html>
|
93
|
+
<html>
|
94
|
+
<head></head>
|
95
|
+
<body>
|
96
|
+
<p>
|
97
|
+
<span></span>
|
98
|
+
<span> </span>
|
99
|
+
<span>
|
100
|
+
|
101
|
+
</span>
|
102
|
+
</p>
|
103
|
+
<p>
|
104
|
+
<!---->
|
105
|
+
<!-- -->
|
106
|
+
<!--
|
107
|
+
|
108
|
+
-->
|
109
|
+
</p>
|
110
|
+
</body>
|
111
|
+
</html>
|
112
|
+
eohtml
|
113
|
+
|
114
|
+
@parser.parse html
|
115
|
+
items = @doc.items.get_root_content "body"
|
116
|
+
items = items.select_methods [
|
117
|
+
:start_element, :end_element,
|
118
|
+
:characters, :comment
|
119
|
+
]
|
120
|
+
items.strip_text! [:characters, :comment]
|
121
|
+
|
122
|
+
assert_equal [
|
123
|
+
[:characters, ''],
|
124
|
+
[:start_element, 'p', []],
|
125
|
+
|
126
|
+
[:characters, ''],
|
127
|
+
[:start_element, 'span', []],
|
128
|
+
[:end_element, 'span'],
|
129
|
+
[:characters, ''],
|
130
|
+
|
131
|
+
[:start_element, 'span', []],
|
132
|
+
[:characters, ''],
|
133
|
+
[:end_element, 'span'],
|
134
|
+
[:characters, ''],
|
135
|
+
|
136
|
+
[:start_element, 'span', []],
|
137
|
+
[:characters, ''],
|
138
|
+
[:end_element, 'span'],
|
139
|
+
[:characters, ''],
|
140
|
+
|
141
|
+
[:end_element, 'p'],
|
142
|
+
[:characters, ''],
|
143
|
+
|
144
|
+
[:start_element, 'p', []],
|
145
|
+
[:characters, ''],
|
146
|
+
|
147
|
+
[:comment, ''],
|
148
|
+
[:characters, ''],
|
149
|
+
[:comment, ''],
|
150
|
+
[:characters, ''],
|
151
|
+
[:comment, ''],
|
152
|
+
[:characters, ''],
|
153
|
+
|
154
|
+
[:end_element, 'p'],
|
155
|
+
[:characters, '']
|
156
|
+
], items
|
157
|
+
|
158
|
+
nil
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
@@ -26,6 +26,12 @@ module Nokogiri
|
|
26
26
|
assert_equal @html.serialize, @doc.serialize
|
27
27
|
end
|
28
28
|
|
29
|
+
def test_default_encoding
|
30
|
+
doc = Nokogiri::HTML(nil)
|
31
|
+
assert_nil doc.encoding
|
32
|
+
assert_equal 'UTF-8', doc.serialize.encoding.name
|
33
|
+
end
|
34
|
+
|
29
35
|
def test_encode_special_chars
|
30
36
|
foo = @html.css('a').first.encode_special_chars('foo')
|
31
37
|
assert_equal 'UTF-8', foo.encoding.name
|
@@ -0,0 +1,202 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "helper"
|
3
|
+
|
4
|
+
module Nokogiri
|
5
|
+
module XML
|
6
|
+
module SAX
|
7
|
+
class TestParserText < Nokogiri::SAX::TestCase
|
8
|
+
def setup
|
9
|
+
super
|
10
|
+
@doc = DocWithOrderedItems.new
|
11
|
+
@parser = XML::SAX::Parser.new @doc
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_texts_order
|
15
|
+
xml = <<-eoxml
|
16
|
+
<?xml version="1.0" ?>
|
17
|
+
<root>
|
18
|
+
text 0
|
19
|
+
<p>
|
20
|
+
text 1
|
21
|
+
<span>text 2</span>
|
22
|
+
text 3
|
23
|
+
</p>
|
24
|
+
|
25
|
+
text 4
|
26
|
+
<!--
|
27
|
+
text 5
|
28
|
+
-->
|
29
|
+
|
30
|
+
<p>
|
31
|
+
<!-- text 6 -->
|
32
|
+
<span><!-- text 7 --></span>
|
33
|
+
<!-- text 8 -->
|
34
|
+
</p>
|
35
|
+
|
36
|
+
<!-- text 9 -->
|
37
|
+
<![CDATA[ text 10 ]]>
|
38
|
+
|
39
|
+
<p>
|
40
|
+
<![CDATA[ text 11 ]]>
|
41
|
+
<span><![CDATA[ text 12 ]]></span>
|
42
|
+
<![CDATA[ text 13 ]]>
|
43
|
+
</p>
|
44
|
+
</root>
|
45
|
+
eoxml
|
46
|
+
|
47
|
+
@parser.parse xml
|
48
|
+
items = @doc.items.get_root_content "root"
|
49
|
+
items = items.select_methods [
|
50
|
+
:start_element, :end_element,
|
51
|
+
:characters, :comment, :cdata_block
|
52
|
+
]
|
53
|
+
items.strip_text! [:characters, :comment, :cdata_block]
|
54
|
+
|
55
|
+
assert_equal [
|
56
|
+
[:characters, 'text 0'],
|
57
|
+
|
58
|
+
[:start_element, 'p', []],
|
59
|
+
[:characters, 'text 1'],
|
60
|
+
|
61
|
+
[:start_element, 'span', []],
|
62
|
+
[:characters, 'text 2'],
|
63
|
+
[:end_element, 'span'],
|
64
|
+
|
65
|
+
[:characters, 'text 3'],
|
66
|
+
[:end_element, 'p'],
|
67
|
+
|
68
|
+
[:characters, 'text 4'],
|
69
|
+
[:comment, 'text 5'],
|
70
|
+
[:characters, ''],
|
71
|
+
|
72
|
+
[:start_element, 'p', []],
|
73
|
+
[:characters, ''],
|
74
|
+
[:comment, 'text 6'],
|
75
|
+
[:characters, ''],
|
76
|
+
|
77
|
+
[:start_element, 'span', []],
|
78
|
+
[:comment, 'text 7'],
|
79
|
+
[:end_element, 'span'],
|
80
|
+
[:characters, ''],
|
81
|
+
|
82
|
+
[:comment, 'text 8'],
|
83
|
+
[:characters, ''],
|
84
|
+
[:end_element, 'p'],
|
85
|
+
[:characters, ''],
|
86
|
+
|
87
|
+
[:comment, 'text 9'],
|
88
|
+
[:characters, ''],
|
89
|
+
[:cdata_block, 'text 10'],
|
90
|
+
[:characters, ''],
|
91
|
+
|
92
|
+
[:start_element, 'p', []],
|
93
|
+
[:characters, ''],
|
94
|
+
[:cdata_block, 'text 11'],
|
95
|
+
[:characters, ''],
|
96
|
+
|
97
|
+
[:start_element, 'span', []],
|
98
|
+
[:cdata_block, 'text 12'],
|
99
|
+
[:end_element, 'span'],
|
100
|
+
[:characters, ''],
|
101
|
+
|
102
|
+
[:cdata_block, 'text 13'],
|
103
|
+
[:characters, ''],
|
104
|
+
|
105
|
+
[:end_element, 'p'],
|
106
|
+
[:characters, '']
|
107
|
+
], items
|
108
|
+
|
109
|
+
nil
|
110
|
+
end
|
111
|
+
|
112
|
+
def text_whitespace
|
113
|
+
xml = <<-eoxml
|
114
|
+
<?xml version="1.0" ?>
|
115
|
+
<root>
|
116
|
+
<p>
|
117
|
+
<span></span>
|
118
|
+
<span> </span>
|
119
|
+
<span>
|
120
|
+
|
121
|
+
</span>
|
122
|
+
</p>
|
123
|
+
<p>
|
124
|
+
<!---->
|
125
|
+
<!-- -->
|
126
|
+
<!--
|
127
|
+
|
128
|
+
-->
|
129
|
+
</p>
|
130
|
+
<p>
|
131
|
+
<![CDATA[]]>
|
132
|
+
<![CDATA[ ]]>
|
133
|
+
<![CDATA[
|
134
|
+
|
135
|
+
]]>
|
136
|
+
</p>
|
137
|
+
</root>
|
138
|
+
eoxml
|
139
|
+
|
140
|
+
@parser.parse xml
|
141
|
+
items = @doc.items.get_root_content "root"
|
142
|
+
items = items.select_methods [
|
143
|
+
:start_element, :end_element,
|
144
|
+
:characters, :comment, :cdata_block
|
145
|
+
]
|
146
|
+
items.strip_text! [:characters, :comment, :cdata_block]
|
147
|
+
|
148
|
+
assert_equal [
|
149
|
+
[:characters, ''],
|
150
|
+
[:start_element, 'p', []],
|
151
|
+
|
152
|
+
[:characters, ''],
|
153
|
+
[:start_element, 'span', []],
|
154
|
+
[:end_element, 'span'],
|
155
|
+
[:characters, ''],
|
156
|
+
|
157
|
+
[:start_element, 'span', []],
|
158
|
+
[:characters, ''],
|
159
|
+
[:end_element, 'span'],
|
160
|
+
[:characters, ''],
|
161
|
+
|
162
|
+
[:start_element, 'span', []],
|
163
|
+
[:characters, ''],
|
164
|
+
[:end_element, 'span'],
|
165
|
+
[:characters, ''],
|
166
|
+
|
167
|
+
[:end_element, 'p'],
|
168
|
+
[:characters, ''],
|
169
|
+
|
170
|
+
[:start_element, 'p', []],
|
171
|
+
[:characters, ''],
|
172
|
+
|
173
|
+
[:comment, ''],
|
174
|
+
[:characters, ''],
|
175
|
+
[:comment, ''],
|
176
|
+
[:characters, ''],
|
177
|
+
[:comment, ''],
|
178
|
+
[:characters, ''],
|
179
|
+
|
180
|
+
[:end_element, 'p'],
|
181
|
+
[:characters, ''],
|
182
|
+
|
183
|
+
[:start_element, 'p', []],
|
184
|
+
[:characters, ''],
|
185
|
+
|
186
|
+
[:cdata_block, ''],
|
187
|
+
[:characters, ''],
|
188
|
+
[:cdata_block, ''],
|
189
|
+
[:characters, ''],
|
190
|
+
[:cdata_block, ''],
|
191
|
+
[:characters, ''],
|
192
|
+
|
193
|
+
[:end_element, 'p'],
|
194
|
+
[:characters, '']
|
195
|
+
], items
|
196
|
+
|
197
|
+
nil
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
@@ -28,6 +28,17 @@ EOF
|
|
28
28
|
doc.xpath('/item').first.add_child(lf_node)
|
29
29
|
assert_match(/
/, doc.to_xml)
|
30
30
|
end
|
31
|
+
|
32
|
+
def test_children_should_always_be_empty
|
33
|
+
# https://github.com/sparklemotion/nokogiri/issues/1238
|
34
|
+
#
|
35
|
+
# libxml2 will create a malformed child node for predefined
|
36
|
+
# entities. because any use of that child is likely to cause a
|
37
|
+
# segfault, we shall pretend that it doesn't exist.
|
38
|
+
entity = Nokogiri::XML::EntityReference.new(@xml, "amp")
|
39
|
+
assert_equal 0, entity.children.length
|
40
|
+
entity.inspect # should not segfault
|
41
|
+
end
|
31
42
|
end
|
32
43
|
|
33
44
|
module Common
|
@@ -13,6 +13,12 @@ module Nokogiri
|
|
13
13
|
assert_equal @xml.serialize, @doc.serialize
|
14
14
|
end
|
15
15
|
|
16
|
+
def test_default_encoding
|
17
|
+
doc = Nokogiri::XML(VEHICLE_XML)
|
18
|
+
assert_nil doc.encoding
|
19
|
+
assert_equal 'UTF-8', doc.serialize.encoding.name
|
20
|
+
end
|
21
|
+
|
16
22
|
def test_encoding_GH_1113
|
17
23
|
utf8 = '<frag>shahid ὡ 𐄣 𢂁</frag>'
|
18
24
|
hex = '<frag>shahid ὡ 𐄣 𢂁</frag>'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -12,12 +12,12 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- - ~>
|
20
|
+
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.2'
|
23
23
|
name: hoe-bundler
|
@@ -25,13 +25,13 @@ dependencies:
|
|
25
25
|
type: :development
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - ~>
|
28
|
+
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '1.2'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - ~>
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '1.4'
|
37
37
|
name: hoe-debugging
|
@@ -39,13 +39,13 @@ dependencies:
|
|
39
39
|
type: :development
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - ~>
|
42
|
+
- - "~>"
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '1.4'
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - ~>
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '1.0'
|
51
51
|
name: hoe-gemspec
|
@@ -53,13 +53,13 @@ dependencies:
|
|
53
53
|
type: :development
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- - ~>
|
56
|
+
- - "~>"
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '1.0'
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- - ~>
|
62
|
+
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '1.6'
|
65
65
|
name: hoe-git
|
@@ -67,13 +67,13 @@ dependencies:
|
|
67
67
|
type: :development
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - ~>
|
70
|
+
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '1.6'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- - ~>
|
76
|
+
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 5.8.4
|
79
79
|
name: minitest
|
@@ -81,13 +81,13 @@ dependencies:
|
|
81
81
|
type: :development
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - ~>
|
84
|
+
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: 5.8.4
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - ~>
|
90
|
+
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '12.0'
|
93
93
|
name: rake
|
@@ -95,13 +95,13 @@ dependencies:
|
|
95
95
|
type: :development
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- - ~>
|
98
|
+
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '12.0'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- - ~>
|
104
|
+
- - "~>"
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: 1.0.3
|
107
107
|
name: rake-compiler
|
@@ -109,27 +109,27 @@ dependencies:
|
|
109
109
|
type: :development
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- - ~>
|
112
|
+
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: 1.0.3
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
requirement: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - ~>
|
118
|
+
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.6.
|
120
|
+
version: 0.6.2
|
121
121
|
name: rake-compiler-dock
|
122
122
|
prerelease: false
|
123
123
|
type: :development
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- - ~>
|
126
|
+
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: 0.6.
|
128
|
+
version: 0.6.2
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- - ~>
|
132
|
+
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: 1.4.14
|
135
135
|
name: racc
|
@@ -137,13 +137,13 @@ dependencies:
|
|
137
137
|
type: :development
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- - ~>
|
140
|
+
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: 1.4.14
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- - ~>
|
146
|
+
- - "~>"
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: 1.0.5
|
149
149
|
name: rexical
|
@@ -151,27 +151,27 @@ dependencies:
|
|
151
151
|
type: :development
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- - ~>
|
154
|
+
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: 1.0.5
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
|
-
- - ~>
|
160
|
+
- - "~>"
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version: '0.
|
162
|
+
version: '0.15'
|
163
163
|
name: concourse
|
164
164
|
prerelease: false
|
165
165
|
type: :development
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- - ~>
|
168
|
+
- - "~>"
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: '0.
|
170
|
+
version: '0.15'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
requirement: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- - ~>
|
174
|
+
- - "~>"
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '4.0'
|
177
177
|
name: rdoc
|
@@ -179,13 +179,13 @@ dependencies:
|
|
179
179
|
type: :development
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - ~>
|
182
|
+
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '4.0'
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
186
|
requirement: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
|
-
- - ~>
|
188
|
+
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: '3.16'
|
191
191
|
name: hoe
|
@@ -193,7 +193,7 @@ dependencies:
|
|
193
193
|
type: :development
|
194
194
|
version_requirements: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- - ~>
|
196
|
+
- - "~>"
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '3.16'
|
199
199
|
description: |-
|
@@ -256,11 +256,11 @@ extra_rdoc_files:
|
|
256
256
|
- ext/nokogiri/xml_xpath_context.c
|
257
257
|
- ext/nokogiri/xslt_stylesheet.c
|
258
258
|
files:
|
259
|
-
- .autotest
|
260
|
-
- .cross_rubies
|
261
|
-
- .editorconfig
|
262
|
-
- .gemtest
|
263
|
-
- .travis.yml
|
259
|
+
- ".autotest"
|
260
|
+
- ".cross_rubies"
|
261
|
+
- ".editorconfig"
|
262
|
+
- ".gemtest"
|
263
|
+
- ".travis.yml"
|
264
264
|
- CHANGELOG.md
|
265
265
|
- CONTRIBUTING.md
|
266
266
|
- C_CODING_STYLE.rdoc
|
@@ -476,6 +476,7 @@ files:
|
|
476
476
|
- lib/nokogiri/xml/element_content.rb
|
477
477
|
- lib/nokogiri/xml/element_decl.rb
|
478
478
|
- lib/nokogiri/xml/entity_decl.rb
|
479
|
+
- lib/nokogiri/xml/entity_reference.rb
|
479
480
|
- lib/nokogiri/xml/namespace.rb
|
480
481
|
- lib/nokogiri/xml/node.rb
|
481
482
|
- lib/nokogiri/xml/node/save_options.rb
|
@@ -556,6 +557,7 @@ files:
|
|
556
557
|
- test/helper.rb
|
557
558
|
- test/html/sax/test_parser.rb
|
558
559
|
- test/html/sax/test_parser_context.rb
|
560
|
+
- test/html/sax/test_parser_text.rb
|
559
561
|
- test/html/sax/test_push_parser.rb
|
560
562
|
- test/html/test_builder.rb
|
561
563
|
- test/html/test_document.rb
|
@@ -583,6 +585,7 @@ files:
|
|
583
585
|
- test/xml/node/test_subclass.rb
|
584
586
|
- test/xml/sax/test_parser.rb
|
585
587
|
- test/xml/sax/test_parser_context.rb
|
588
|
+
- test/xml/sax/test_parser_text.rb
|
586
589
|
- test/xml/sax/test_push_parser.rb
|
587
590
|
- test/xml/test_attr.rb
|
588
591
|
- test/xml/test_attribute_decl.rb
|
@@ -625,23 +628,23 @@ licenses:
|
|
625
628
|
metadata: {}
|
626
629
|
post_install_message:
|
627
630
|
rdoc_options:
|
628
|
-
- --main
|
631
|
+
- "--main"
|
629
632
|
- README.md
|
630
633
|
require_paths:
|
631
634
|
- lib
|
632
635
|
required_ruby_version: !ruby/object:Gem::Requirement
|
633
636
|
requirements:
|
634
|
-
- -
|
637
|
+
- - ">="
|
635
638
|
- !ruby/object:Gem::Version
|
636
639
|
version: 1.9.3
|
637
640
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
638
641
|
requirements:
|
639
|
-
- -
|
642
|
+
- - ">="
|
640
643
|
- !ruby/object:Gem::Version
|
641
644
|
version: '0'
|
642
645
|
requirements: []
|
643
646
|
rubyforge_project:
|
644
|
-
rubygems_version: 2.
|
647
|
+
rubygems_version: 2.6.13
|
645
648
|
signing_key:
|
646
649
|
specification_version: 4
|
647
650
|
summary: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
|