nokogiri 1.6.7.rc3 → 1.6.7.rc4
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 +4 -4
- data/CHANGELOG.ja.rdoc +29 -1
- data/CHANGELOG.rdoc +28 -0
- data/Gemfile +2 -2
- data/Rakefile +2 -1
- data/ext/nokogiri/extconf.rb +8 -3
- data/ext/nokogiri/xml_sax_parser_context.c +2 -2
- data/lib/nokogiri/version.rb +1 -1
- data/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch +32 -0
- data/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch +49 -0
- data/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch +177 -0
- data/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch +32 -0
- data/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch +28 -0
- data/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch +31 -0
- data/patches/libxml2/0009-Updated-config.guess.patch +397 -0
- data/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch +64 -0
- data/patches/libxslt/0016-Fix-for-type-confusion-in-preprocessing-attributes.patch +29 -0
- data/patches/libxslt/0017-Updated-config.guess.patch +1226 -0
- data/test/html/test_document.rb +5 -0
- data/test/xml/test_schema.rb +15 -2
- data/test/xml/test_xpath.rb +15 -0
- data/test_all +3 -3
- metadata +17 -7
data/test/html/test_document.rb
CHANGED
@@ -14,6 +14,11 @@ module Nokogiri
|
|
14
14
|
assert @html.xpath(nil)
|
15
15
|
end
|
16
16
|
|
17
|
+
def test_does_not_fail_with_illformatted_html
|
18
|
+
doc = Nokogiri::HTML('"</html>";'.force_encoding(Encoding::BINARY))
|
19
|
+
assert_not_nil doc
|
20
|
+
end
|
21
|
+
|
17
22
|
def test_exceptions_remove_newlines
|
18
23
|
errors = @html.errors
|
19
24
|
assert errors.length > 0, 'has errors'
|
data/test/xml/test_schema.rb
CHANGED
@@ -94,9 +94,22 @@ EOF
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def test_validate_invalid_document
|
97
|
-
|
97
|
+
doc = Nokogiri::XML File.read(PO_XML_FILE)
|
98
|
+
doc.css("city").unlink
|
98
99
|
|
99
|
-
assert errors = @xsd.validate(
|
100
|
+
assert errors = @xsd.validate(doc)
|
101
|
+
assert_equal 2, errors.length
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_validate_invalid_file
|
105
|
+
tempfile = Tempfile.new("xml")
|
106
|
+
|
107
|
+
doc = Nokogiri::XML File.read(PO_XML_FILE)
|
108
|
+
doc.css("city").unlink
|
109
|
+
tempfile.write doc.to_xml
|
110
|
+
tempfile.close
|
111
|
+
|
112
|
+
assert errors = @xsd.validate(tempfile.path)
|
100
113
|
assert_equal 2, errors.length
|
101
114
|
end
|
102
115
|
|
data/test/xml/test_xpath.rb
CHANGED
@@ -425,6 +425,21 @@ END
|
|
425
425
|
assert_equal 1, xml_doc.xpath('//mods:titleInfo',ns_hash).length
|
426
426
|
assert_equal 'finnish', xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).first.value
|
427
427
|
end
|
428
|
+
|
429
|
+
def test_xpath_after_reset_doc_via_innerhtml
|
430
|
+
xml = <<XML
|
431
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
432
|
+
<document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
|
433
|
+
<text:section name="Section1">[TEXT_INSIDE_SECTION]</text:section>
|
434
|
+
</document>
|
435
|
+
XML
|
436
|
+
|
437
|
+
doc = Nokogiri::XML(xml)
|
438
|
+
doc.inner_html = doc.inner_html
|
439
|
+
sections = doc.xpath(".//text:section[@name='Section1']")
|
440
|
+
assert_equal 1, sections.size
|
441
|
+
assert_equal "[TEXT_INSIDE_SECTION]", sections.first.text
|
442
|
+
end
|
428
443
|
end
|
429
444
|
end
|
430
445
|
end
|
data/test_all
CHANGED
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.6.7.
|
4
|
+
version: 1.6.7.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -12,22 +12,22 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
|
-
name:
|
18
|
+
name: mini_portile2
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: 2.0.0.rc2
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0.
|
30
|
+
version: 2.0.0.rc2
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rdoc
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +188,14 @@ dependencies:
|
|
188
188
|
requirements:
|
189
189
|
- - "~>"
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: '3.
|
191
|
+
version: '3.14'
|
192
192
|
type: :development
|
193
193
|
prerelease: false
|
194
194
|
version_requirements: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
196
|
- - "~>"
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version: '3.
|
198
|
+
version: '3.14'
|
199
199
|
description: |-
|
200
200
|
Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
|
201
201
|
Nokogiri's many features is the ability to search documents via XPath
|
@@ -413,6 +413,14 @@ files:
|
|
413
413
|
- lib/xsd/xmlparser/nokogiri.rb
|
414
414
|
- patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch
|
415
415
|
- patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
|
416
|
+
- patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch
|
417
|
+
- patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch
|
418
|
+
- patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
|
419
|
+
- patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch
|
420
|
+
- patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch
|
421
|
+
- patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
|
422
|
+
- patches/libxml2/0009-Updated-config.guess.patch
|
423
|
+
- patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch
|
416
424
|
- patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch
|
417
425
|
- patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
|
418
426
|
- patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch
|
@@ -425,6 +433,8 @@ files:
|
|
425
433
|
- patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
|
426
434
|
- patches/libxslt/0014-Fix-for-bug-436589.patch
|
427
435
|
- patches/libxslt/0015-Fix-mkdir-for-mingw.patch
|
436
|
+
- patches/libxslt/0016-Fix-for-type-confusion-in-preprocessing-attributes.patch
|
437
|
+
- patches/libxslt/0017-Updated-config.guess.patch
|
428
438
|
- patches/sort-patches-by-date
|
429
439
|
- ports/archives/libxml2-2.9.2.tar.gz
|
430
440
|
- ports/archives/libxslt-1.1.28.tar.gz
|