issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 262k ⌀ | issue_title stringlengths 1 1.02k | issue_comments_url stringlengths 53 116 | issue_comments_count int64 0 2.49k | issue_created_at stringdate 1999-03-17 02:06:42 2025-06-23 11:41:49 | issue_updated_at stringdate 2000-02-10 06:43:57 2025-06-23 11:43:00 | issue_html_url stringlengths 34 97 | issue_github_id int64 132 3.17B | issue_number int64 1 215k |
|---|---|---|---|---|---|---|---|---|---|
[
"sparklemotion",
"nokogiri"
] | Using external xml entities you can specify URLs (e.g. HTTP) to be contacted when attacker-supplied XML is parsed. This can be used to trigger URLs on the internal network of a XML parsing service and potentially leak their responses.
External xml entities should be completely (file, http, etc.) disabled.
```
$ cat ... | nokogiri vulnerable to XXE attack when used under c ruby | https://api.github.com/repos/sparklemotion/nokogiri/issues/693/comments | 18 | 2012-06-06T09:34:24Z | 2020-09-23T12:15:38Z | https://github.com/sparklemotion/nokogiri/issues/693 | 4,925,753 | 693 |
[
"sparklemotion",
"nokogiri"
] | Hi,
I'm running the following script
``` ruby
require 'nokogiri'
require 'benchmark'
puts Nokogiri::VERSION
doc = Nokogiri::XML::Document.new
root = Nokogiri::XML::Node.new('root', doc)
Benchmark.bm { |x|
x.report {
10000.times do |i|
root << Nokogiri::XML::Node.new('randomNode', doc)
end
}
}
```... | add_child seems very slow under pure java implementation | https://api.github.com/repos/sparklemotion/nokogiri/issues/692/comments | 9 | 2012-06-05T08:29:57Z | 2016-03-11T21:19:00Z | https://github.com/sparklemotion/nokogiri/issues/692 | 4,904,226 | 692 |
[
"sparklemotion",
"nokogiri"
] | Given the following script
```
require 'nokogiri'
puts Nokogiri::VERSION
fragment = Nokogiri::HTML::DocumentFragment.parse("a<a> b </a>")
node = fragment.children[1]
puts node.inspect
node.children.each {|n| node.add_previous_sibling(n) }
puts node.inspect
```
In JRuby Nokogiri 1.5.0 you get the following output:
``... | Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) | https://api.github.com/repos/sparklemotion/nokogiri/issues/691/comments | 10 | 2012-06-04T23:31:15Z | 2012-06-12T14:31:31Z | https://github.com/sparklemotion/nokogiri/issues/691 | 4,899,406 | 691 |
[
"sparklemotion",
"nokogiri"
] | While trying to parse the following XML, I get the following error:
``` shell
1) HappyMapper should parse xml with default namespace
Failure/Error: product = Product.parse(fixture_file('product_default_namespace.xml'), :single => true)
Nokogiri::XML::XPath::SyntaxError:
happymapper:.|.//text()
... | Failure parsing XML with default namespace (jruby) | https://api.github.com/repos/sparklemotion/nokogiri/issues/689/comments | 2 | 2012-05-29T16:48:21Z | 2012-05-30T14:39:37Z | https://github.com/sparklemotion/nokogiri/issues/689 | 4,799,252 | 689 |
[
"sparklemotion",
"nokogiri"
] | nokogiri supports the CSS selector `parent:has(descendant)` but does not support `parent:has(>child)`. jQuery supports both, so it would be great if nokogiri would also support `parent:has(>child)`.
| Should support CSS selector: parent:has(>child) | https://api.github.com/repos/sparklemotion/nokogiri/issues/688/comments | 3 | 2012-05-28T06:11:25Z | 2019-04-23T01:28:18Z | https://github.com/sparklemotion/nokogiri/issues/688 | 4,775,820 | 688 |
[
"sparklemotion",
"nokogiri"
] | The example on http://nokogiri.org/Nokogiri/XML/SAX.html shows
4.# Feed the parser some XML
5.parser.parse(File.read(ARGV[0], 'rb'))
The main reason to use a SAX parser is to iterate through xml files that are larger than ram. File.open tries to load the whole file into ram. I believe it'd be a better example to use... | SAX example is not streaming | https://api.github.com/repos/sparklemotion/nokogiri/issues/684/comments | 3 | 2012-05-22T19:11:36Z | 2012-05-23T16:41:14Z | https://github.com/sparklemotion/nokogiri/issues/684 | 4,697,513 | 684 |
[
"sparklemotion",
"nokogiri"
] | Running this program in c ruby (1.9.3-p194)
``` ruby
require 'rubygems'
require 'rdf'
require 'rdf/rdfxml'
graph = RDF::Graph.new
RDF::RDFXML::Writer.open("test.rdf") do |writer|
writer.write_graph(graph)
end
```
Produces a file that looks like this:
``` xml
<?xml version="1.0" encoding="UTF-8"?>
<r... | jruby NAMESPACE_ERR | https://api.github.com/repos/sparklemotion/nokogiri/issues/683/comments | 2 | 2012-05-22T16:04:04Z | 2012-06-14T12:02:46Z | https://github.com/sparklemotion/nokogiri/issues/683 | 4,693,775 | 683 |
[
"sparklemotion",
"nokogiri"
] | I'm writing some highly concurrent data processing scripts, and I'm running into lots of random XPath syntax errors.
```
Exception: #<Nokogiri::XML::XPath::SyntaxError: .//:Id>
["nokogiri/XmlXpathContext.java:123:in `evaluate'",
"/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/nokogiri-1.5.2-java/lib/nokogiri/xml/nod... | Multithreading issues with JRuby 1.6.7 and XPath parsing | https://api.github.com/repos/sparklemotion/nokogiri/issues/682/comments | 11 | 2012-05-22T00:48:13Z | 2013-09-30T17:30:27Z | https://github.com/sparklemotion/nokogiri/issues/682 | 4,682,488 | 682 |
[
"sparklemotion",
"nokogiri"
] | When building nokogiri's native extensions with GCC 4.6.3 on Ubuntu and -Werror=format-security enabled, this error appears:
```
1 a.panek@test-web01 /srv/web/esotericsystems.at/email (git)-[master] % cat /usr/local/rvm/gems/ruby-1.9.3-p0/gems/nokogiri-1.5.2/ext/nokogiri/gem_make.out
/usr/local/rvm/rubies/ruby-1.9.3-p... | -Werror=format-security | https://api.github.com/repos/sparklemotion/nokogiri/issues/680/comments | 14 | 2012-05-18T23:50:28Z | 2014-05-19T20:56:48Z | https://github.com/sparklemotion/nokogiri/issues/680 | 4,651,368 | 680 |
[
"sparklemotion",
"nokogiri"
] | ``` rb
require 'nokogiri'
doc = Nokogiri('<a>b</a>')
text_node = doc.at('/a/text()')
Array(text_node)
#=> []
```
I expected: `[<text_node>]`
``` yaml
# Nokogiri (1.5.2)
---
warnings: []
nokogiri: 1.5.2
ruby:
version: 1.9.3
platform: x86_64-darwin11.2.0
description: ruby 1.9.3p0 (2011... | Kernel.Array() method fails to wrap text node | https://api.github.com/repos/sparklemotion/nokogiri/issues/679/comments | 25 | 2012-05-15T21:51:40Z | 2016-02-17T04:52:10Z | https://github.com/sparklemotion/nokogiri/issues/679 | 4,594,044 | 679 |
[
"sparklemotion",
"nokogiri"
] | The following code segfaults under Ruby 1.8.7 and Nokogiri 1.5.2
``` ruby
#!/usr/bin/ruby
require 'rubygems'
require 'nokogiri'
doc = Nokogiri::XML::DocumentFragment.parse('<p>hello world</p>')
c = Nokogiri::XML::Comment.new(doc,'moo')
```
Error message:
```
./nokogiri-comment.rb:5: [BUG] Segmentation fault
ruby 1.8... | Segmentation fault when creating a comment node for a DocumentFragment | https://api.github.com/repos/sparklemotion/nokogiri/issues/677/comments | 4 | 2012-05-14T00:56:54Z | 2012-06-07T20:03:30Z | https://github.com/sparklemotion/nokogiri/issues/677 | 4,556,239 | 677 |
[
"sparklemotion",
"nokogiri"
] | If a URL is provided when creating a document, Nokogiri errors out on JRuby:
<pre>
doc = Nokogiri::HTML(open('http://google.com/').read, 'http://google.com/', nil)
pp doc.errors
=> [#<Nokogiri::XML::SyntaxError: /home/nirvdrum/dev/workspaces/mogotest/http:/google.com (No such file or directory)>]
</pre>
| JRuby unable to create HTML doc if URL arg provided | https://api.github.com/repos/sparklemotion/nokogiri/issues/674/comments | 8 | 2012-05-08T03:05:50Z | 2012-06-12T14:04:16Z | https://github.com/sparklemotion/nokogiri/issues/674 | 4,466,419 | 674 |
[
"sparklemotion",
"nokogiri"
] | Hi,
I just upgraded to 1.5.3rc5 and started seeing:
<pre>
ArgumentError:
uncaught throw `encoding_found'
# nokogiri/XmlSaxParserContext.java:241:in `parse_with'
</pre>
It's a bit tricky to reproduce, but I think a reliable way is to save an HTML doc to disk without any any BOM or encoding info in the file. Loa... | uncaught throw `encoding_found' in JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/673/comments | 3 | 2012-05-08T02:21:28Z | 2012-06-12T16:50:12Z | https://github.com/sparklemotion/nokogiri/issues/673 | 4,466,109 | 673 |
[
"sparklemotion",
"nokogiri"
] | Task: get last div (with text "3").
``` ruby
d = Nokogiri::HTML::Document.parse('<html><body><div>1</div><div>2</div><div>3</div></body></html>')
p d.css('div:last-child')
# => [
# #<Nokogiri::XML::Element:0x769abc name="div" children=[#<Nokogiri::XML::Text:0x769814 "3">]>
# ]
```
This works fine.
``` ruby
d = Noko... | nth-child broken for DocumentFragment | https://api.github.com/repos/sparklemotion/nokogiri/issues/672/comments | 3 | 2012-05-07T20:11:59Z | 2022-08-17T19:33:53Z | https://github.com/sparklemotion/nokogiri/issues/672 | 4,461,369 | 672 |
[
"sparklemotion",
"nokogiri"
] | If you try to specify any encoding other than UTF-8 or ASCII, the encoding does not appear to 'take'. As far as I can tell it's an issue with libxml2 . I suspect that it's not just the SAX parser, but I haven't dug any deeper at this point.
Easy way to show the problem:
``` ruby
Nokogiri::XML::SAX::ParserContext.io(S... | Specifying encoding on a SAX parser does not work | https://api.github.com/repos/sparklemotion/nokogiri/issues/671/comments | 8 | 2012-05-04T15:45:48Z | 2023-12-27T18:20:38Z | https://github.com/sparklemotion/nokogiri/issues/671 | 4,426,259 | 671 |
[
"sparklemotion",
"nokogiri"
] | # Nokogiri (1.5.2)
```
---
warnings: []
nokogiri: 1.5.2
ruby:
version: 1.9.2
platform: i686-linux
description: ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
engine: ruby
libxml:
binding: extension
compiled: 2.7.8
loaded: 2.7.8
```
SO: Ubuntu 11.10
Code:
require 'rubygems'
require 'nokogiri'... | Segmentation Fault on require | https://api.github.com/repos/sparklemotion/nokogiri/issues/670/comments | 1 | 2012-05-03T14:06:04Z | 2012-05-03T14:09:16Z | https://github.com/sparklemotion/nokogiri/issues/670 | 4,405,604 | 670 |
[
"sparklemotion",
"nokogiri"
] | For example, search 'ruby' in google website, the link will like this:
`https://www.google.com/search?q=ruby`,
and everything will be ok.
But if I use Chrome and enter the keywords in address bar, the link will like this:
`http://www.google.com.hk/search?aq=f&sourceid=chrome&ie=UTF-8&q=ruby`,
when I use nokogiri any... | Error when fetch google search | https://api.github.com/repos/sparklemotion/nokogiri/issues/669/comments | 1 | 2012-05-01T04:29:11Z | 2012-05-01T17:26:39Z | https://github.com/sparklemotion/nokogiri/issues/669 | 4,363,009 | 669 |
[
"sparklemotion",
"nokogiri"
] | ``` ruby
example = "<p>test</p>\n"
test = Nokogiri::HTML::DocumentFragment.parse(example)
ap test.to_html(:save_with => 0)
"<p>test</p>"
```
As you can see Nokogiri erroneously strips a newline that is part of the string, newlines are just as valid as any other letter and shouldn't pointlessly be removed.
| HTML::DocumentFragment.parse strips newlines when used outside node context | https://api.github.com/repos/sparklemotion/nokogiri/issues/668/comments | 2 | 2012-04-30T15:34:49Z | 2019-01-05T07:50:17Z | https://github.com/sparklemotion/nokogiri/issues/668 | 4,352,251 | 668 |
[
"sparklemotion",
"nokogiri"
] | I ran into a minor issue with nokogori (https://github.com/tenderlove/nokogiri/blob/master/lib/nokogiri/html/document.rb#L183 throwing :encoding_found.to_s but catching a symbol) and wanted to run the tests to see if they passed. However, I ran into:
bash-3.2$ rake test
install -c tmp/java/nokogiri/nokogiri.jar lib/no... | How do I run nokogiri tests in JRuby? | https://api.github.com/repos/sparklemotion/nokogiri/issues/667/comments | 1 | 2012-04-30T01:56:11Z | 2012-04-30T15:58:21Z | https://github.com/sparklemotion/nokogiri/issues/667 | 4,344,877 | 667 |
[
"sparklemotion",
"nokogiri"
] | From the docs: `A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes`
I want to prepend a regular hash attribute
``` ruby
my_hash = { 'my_key' => 'bar' }
my_hash['my_key'].insert 0, 'foo'
my_hash #=> {'my_key'=>'foobar'}
```
This simply cannot be done with nokogiri
``` ruby
doc = Nokog... | Operating on node attributes | https://api.github.com/repos/sparklemotion/nokogiri/issues/666/comments | 6 | 2012-04-25T20:36:41Z | 2012-07-17T13:52:04Z | https://github.com/sparklemotion/nokogiri/issues/666 | 4,289,465 | 666 |
[
"sparklemotion",
"nokogiri"
] | I am trying to insert an HTML fragment into a doc, but for some reason the output HTML doesn't respect UTF-8 encoding. Here is the snippet:
```
doc = Nokogiri::HTML.parse("<h1></h1>", nil, "utf-8")
content = "ulalá <b>bold</b>"
puts content # ulalá <b>bold</b>
puts content.encoding # UTF-8
doc.css("h1").f... | Problems with add_child and UTF-8 encoding | https://api.github.com/repos/sparklemotion/nokogiri/issues/665/comments | 2 | 2012-04-25T17:30:01Z | 2012-04-26T15:16:56Z | https://github.com/sparklemotion/nokogiri/issues/665 | 4,285,504 | 665 |
[
"sparklemotion",
"nokogiri"
] | If you want to [insert a node as the first child of another](http://stackoverflow.com/q/10300095/405017) you currently have to write code like:
```
dad.children.empty? ? dad << contents : dad.children.first.before(contents)
```
If Nokogiri added a `Nokogiri::XML::Node#insert_before` method like the DOM 2 Core method ... | Add DOM-compatible method `insert_before` | https://api.github.com/repos/sparklemotion/nokogiri/issues/664/comments | 3 | 2012-04-24T22:17:14Z | 2013-10-30T13:12:10Z | https://github.com/sparklemotion/nokogiri/issues/664 | 4,270,711 | 664 |
[
"sparklemotion",
"nokogiri"
] | I tried to narrow it down as much as I could, here's how I reproduce:
``` ruby
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open("http://www.dcfm.org/namebizsearchresults.asp?businessname="))
tables = doc.search("table")
table = tables.sort_by{|t|t.children.length}.last
table.search("td").to_a.each_wit... | ruby 1.9.2 segfault on td inner_html | https://api.github.com/repos/sparklemotion/nokogiri/issues/663/comments | 11 | 2012-04-24T18:49:53Z | 2013-11-20T07:59:26Z | https://github.com/sparklemotion/nokogiri/issues/663 | 4,266,733 | 663 |
[
"sparklemotion",
"nokogiri"
] | I have the following code
``` ruby
doc = Nokogiri::XML(File.open(in_file, 'rb'))
xsl = Nokogiri::XSLT(File.open(xsl_theme_file, 'rb'))
out_file.write xsl.transform(doc, xsl_arguments)
```
In my XSL (using DocBook) I have the following:
``` xml
<xsl:import href="../xsl/fo/docbook.xsl"/>
```
Upon attempting the trans... | xsl:include not resolving relative paths correctly | https://api.github.com/repos/sparklemotion/nokogiri/issues/662/comments | 1 | 2012-04-24T17:44:37Z | 2012-04-25T15:50:53Z | https://github.com/sparklemotion/nokogiri/issues/662 | 4,265,075 | 662 |
[
"sparklemotion",
"nokogiri"
] | When installing version 1.4.4, 1.4.5, 1.4.6, 1.4.7 and 1.5.2 i got the following error on Mac OS 10.7.3:
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
Reinstalling libiconv was not possible because brew is not installing libiconv anymore.
Changing have_library('iconv'... to... | Crash when trying to install - libiconv not found on OSX | https://api.github.com/repos/sparklemotion/nokogiri/issues/661/comments | 1 | 2012-04-23T14:48:26Z | 2012-04-23T18:04:37Z | https://github.com/sparklemotion/nokogiri/issues/661 | 4,241,885 | 661 |
[
"sparklemotion",
"nokogiri"
] | Homebrew 0.9 removed the libiconv recipe, pointing you instead to the system-installed libiconv. However, nokogiri's extconf.rb doesn't find the systemwide iconv, even when using `--with-iconv-dir` and installing iconv from source.
Chaging `have_library` to `find_library` in extconf.rb fixes the issue.
| Nokogiri 1.4.4 and greater fail to install w/ Homebrew 0.9 | https://api.github.com/repos/sparklemotion/nokogiri/issues/659/comments | 3 | 2012-04-23T14:03:18Z | 2012-04-27T04:30:41Z | https://github.com/sparklemotion/nokogiri/issues/659 | 4,240,815 | 659 |
[
"sparklemotion",
"nokogiri"
] | I am sorry but I am unable to reduce this to a simpler test case, anyway I have put some minimal code that reproduces the issue in a gist with the error reports attached.
https://gist.github.com/2467094
The box is a mecbook pro running snow leopard,
$ uname -a
Darwin mecbucpro.local 10.8.0 Darwin Kernel Version 10... | crash when using finalizer+pretty print in 1.9.3/1.9.2 on osx | https://api.github.com/repos/sparklemotion/nokogiri/issues/658/comments | 4 | 2012-04-22T21:39:18Z | 2014-06-26T04:41:48Z | https://github.com/sparklemotion/nokogiri/issues/658 | 4,232,205 | 658 |
[
"sparklemotion",
"nokogiri"
] | can be reproduced with this code (t.tb)
```
require 'test/unit'
require 'rubygems'
require 'nokogiri'
require 'pp'
class T < Test::Unit::TestCase
def test_pp_does_not_explode
doc = Nokogiri::HTML::Document.parse(DATA)
doc.search('.//*').each do |node|
pp node
... | pretty print broken in jruby 1.6.7 in 1.9 mode | https://api.github.com/repos/sparklemotion/nokogiri/issues/657/comments | 4 | 2012-04-17T12:21:23Z | 2012-11-25T06:12:21Z | https://github.com/sparklemotion/nokogiri/issues/657 | 4,151,771 | 657 |
[
"sparklemotion",
"nokogiri"
] | I think this test really says it all.
``` ruby
require 'rubygems'
require 'nokogiri'
fail_xml = <<-XML
<root>
<stuff>thing</stuff>
</root>
XML
fail_doc = Nokogiri::XML(fail_xml)
puts fail_doc.xpath("//root").xpath("./stuff/text()").inspect #works
puts fail_doc.xpath("//root/stuff/text() = 'thing'").inspect #works... | Functions or expressions raises exception in chained xpath call | https://api.github.com/repos/sparklemotion/nokogiri/issues/656/comments | 3 | 2012-04-16T16:26:49Z | 2016-02-17T04:50:11Z | https://github.com/sparklemotion/nokogiri/issues/656 | 4,137,644 | 656 |
[
"sparklemotion",
"nokogiri"
] | When trying to fetch the encoding type from http://www.ropetacklecentre.co.uk/ I get the following error:
```
doc = Nokogiri::HTML(open('http://www.ropetacklecentre.co.uk/'))
>> doc.meta_encoding
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
... | NoMethodError when fetching encoding type from a particular document | https://api.github.com/repos/sparklemotion/nokogiri/issues/655/comments | 4 | 2012-04-13T18:36:33Z | 2012-04-26T19:51:38Z | https://github.com/sparklemotion/nokogiri/issues/655 | 4,110,096 | 655 |
[
"sparklemotion",
"nokogiri"
] | Just recently update the gems for a project and nokogiri 1.5.2 can't get installed has there's an error during in the Makefile:
```
make install
/bin/install -c -m 0755 nokogiri.so /home/budu/.rvm/gems/ree-1.8.7-2011.03@belden-training/gems/nokogiri-1.5.2/lib/nokogiri
make: /bin/install: Command not found
```
The `i... | Installation problem with 1.5.2 | https://api.github.com/repos/sparklemotion/nokogiri/issues/653/comments | 2 | 2012-04-10T17:01:37Z | 2012-04-10T22:06:50Z | https://github.com/sparklemotion/nokogiri/issues/653 | 4,049,866 | 653 |
[
"sparklemotion",
"nokogiri"
] | I read on https://github.com/tenderlove/nokogiri/wiki/From-jQuery-Traversing about using :eq for traversing and selecting an element using Nokogiri, which is great... untilI discovered that :eq(1) refers to the first element with Nokogiri, and in JQuery it refers to the second element (zero indexed), see http://api.jqu... | :eq css selector should index from zero | https://api.github.com/repos/sparklemotion/nokogiri/issues/652/comments | 3 | 2012-04-06T14:16:07Z | 2019-01-05T07:38:54Z | https://github.com/sparklemotion/nokogiri/issues/652 | 4,004,333 | 652 |
[
"sparklemotion",
"nokogiri"
] | In http://nokogiri.org/Nokogiri/XSLT.html says 'maniuplating' instead of 'manipulating'.
| Documentation typo | https://api.github.com/repos/sparklemotion/nokogiri/issues/650/comments | 4 | 2012-04-05T12:47:23Z | 2012-04-05T14:57:46Z | https://github.com/sparklemotion/nokogiri/issues/650 | 3,987,449 | 650 |
[
"sparklemotion",
"nokogiri"
] | The following code:
Nokogiri::HTML::DocumentFragment.parse("à")
Crashes with this backtrace:
```
RegexpError: premature end of regular expression: /^\s*�/
from /usr/lib/ruby/1.8/nokogiri/xml/fragment_handler.rb:53:in `characters'
from /usr/lib/ruby/1.8/nokogiri/html/sax/parser.rb:34:in `parse_with'
... | Crash trying to parse à entity | https://api.github.com/repos/sparklemotion/nokogiri/issues/649/comments | 4 | 2012-04-03T23:01:34Z | 2012-04-26T14:07:56Z | https://github.com/sparklemotion/nokogiri/issues/649 | 3,961,019 | 649 |
[
"sparklemotion",
"nokogiri"
] | ``` ruby
require 'nokogiri'
describe Nokogiri::XML::Node do
let(:node) { Nokogiri::XML.parse('<foo xmlns="http://bar.com"/>').root }
subject { Nokogiri::XML::Node.new 'foo', node.document }
describe '#namespace=' do
it 'should set a namespace which does not have a prefix' do
subject.namespace = node... | Nokogiri::XML::Node#namespace= cannot set a namespace without a prefix on JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/648/comments | 10 | 2012-04-01T10:33:48Z | 2012-04-01T23:10:20Z | https://github.com/sparklemotion/nokogiri/issues/648 | 3,915,667 | 648 |
[
"sparklemotion",
"nokogiri"
] | Running this against HEAD:
``` ruby
require 'nokogiri'
describe Nokogiri::XML::Node do
subject { Nokogiri::XML.parse('<foo xml:bar="http://bar.com"/>').root }
describe '#attributes' do
it 'should include namespaces' do
ns = subject.attributes['bar'].namespace
ns.should_not be_nil
ns.should... | Nokogiri::XML::Attribute on JRuby returns a nil namespace | https://api.github.com/repos/sparklemotion/nokogiri/issues/647/comments | 6 | 2012-03-31T09:47:18Z | 2012-03-31T20:07:23Z | https://github.com/sparklemotion/nokogiri/issues/647 | 3,909,398 | 647 |
[
"sparklemotion",
"nokogiri"
] | This bug was found while investigating issue #641
```
require 'rubygems'
require 'nokogiri'
builder = Nokogiri::XML::Builder.new do |xml|
0.upto(81900) do
xml.text "test"
end
end
```
raised:
```
RuntimeError: Document already has a root node
add_child at /Users/yoko/Documents/workspace/Ranunculus/lib/nok... | "Document already has a root node" while using Builder | https://api.github.com/repos/sparklemotion/nokogiri/issues/646/comments | 4 | 2012-03-31T01:31:12Z | 2013-11-17T03:42:18Z | https://github.com/sparklemotion/nokogiri/issues/646 | 3,907,567 | 646 |
[
"sparklemotion",
"nokogiri"
] | From rosco christopher.biltoft@gmail.com on the nokogiri-talk mailing list:
```
require 'nokogiri'
require 'open-uri'
url = 'http://xiandaipump.en.made-in-china.com/product/DbpngKCrEsWB/China-Industrial-Pump-CDLF-.html'
html = open(url)
doc = Nokogiri::HTML html
doc.css('a').each { |anchor| anchor.replace anchor.inne... | Segfault when encountering an error in in-context parsing | https://api.github.com/repos/sparklemotion/nokogiri/issues/643/comments | 4 | 2012-03-28T10:41:54Z | 2020-02-02T18:52:58Z | https://github.com/sparklemotion/nokogiri/issues/643 | 3,848,365 | 643 |
[
"sparklemotion",
"nokogiri"
] | It seems that `Nokogiri::XML::Schema#validate` for filenames (not `Nokogiri::XML::Document`s) does not return any errors for malformed XML documents: only for well-formed documents that do not conform to the provided schema.
``` ruby
require 'nokogiri'
Nokogiri::VERSION
# => "1.5.3.rc3"
RUBY_VERSION
# => "1.9.3"
ba... | XML::Schema#validate(filename) returns 0 errors for malformed documents | https://api.github.com/repos/sparklemotion/nokogiri/issues/642/comments | 4 | 2012-03-27T18:52:35Z | 2024-06-25T00:59:25Z | https://github.com/sparklemotion/nokogiri/issues/642 | 3,833,543 | 642 |
[
"sparklemotion",
"nokogiri"
] | Investigate!
```
builder = Nokogiri::XML::Builder.new do |xml|
0.upto(81900) do
xml.text "test"
end
end
```
(Note: I've got a side branch that may optimize this a bit. I will resurrect and try it out.)
| GC is painfully slow when there are lots of nodes | https://api.github.com/repos/sparklemotion/nokogiri/issues/641/comments | 3 | 2012-03-26T17:37:02Z | 2019-01-05T07:02:07Z | https://github.com/sparklemotion/nokogiri/issues/641 | 3,813,057 | 641 |
[
"sparklemotion",
"nokogiri"
] | From nokogiri-talk, @marnen says:
```
1. Parameters are passed to external functions in incorrect order
# XSLT call
my_namespace:pad_number('12345', '9')
# Ruby
class Xslt::Functions
def pad_number(value, length)
...
end
end
result: value is "9" and length is "12345" -- the reverse of the calling order
2. ... | XSLT custom function argument handling is broken | https://api.github.com/repos/sparklemotion/nokogiri/issues/640/comments | 4 | 2012-03-26T16:53:13Z | 2012-04-18T21:02:17Z | https://github.com/sparklemotion/nokogiri/issues/640 | 3,812,133 | 640 |
[
"sparklemotion",
"nokogiri"
] | Hello!
I want to get to node `c`.
``` ruby
gem 'nokogiri'
require 'nokogiri'
xml = Nokogiri::XML('<p:a xmlns:p="http://run.forest" xmlns="http://over.here"><c>Text</c></s:a>')
xml.xpath('/p:a')
# All good here.
# => [#<Nokogiri::XML::Element:0x3fdbfd6c802c name="a" namespace=#<Nokogiri::XML::Namespace:0x3fdbfd6cbf9c... | Can't xpath search a default-namespaced node under a named-namespaced node | https://api.github.com/repos/sparklemotion/nokogiri/issues/639/comments | 8 | 2012-03-21T22:29:02Z | 2012-03-26T19:13:05Z | https://github.com/sparklemotion/nokogiri/issues/639 | 3,754,772 | 639 |
[
"sparklemotion",
"nokogiri"
] | ```
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<response xmlns=\"http://www.isinet.com/xrpc41\" src=\"app.id=Umlaut\">\n<fn name=\"LinksAMR.retrieve\" rc=\"OK\">\n<map>\n<map name=\"cite_id\">\n<map name=\"JCR\">\n<val name=\"impactGraphURL\"><![CDATA[http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVer... | 1.5.1/2 nokogiri regression? xpath with attribute | https://api.github.com/repos/sparklemotion/nokogiri/issues/638/comments | 8 | 2012-03-20T17:41:08Z | 2012-04-16T12:30:22Z | https://github.com/sparklemotion/nokogiri/issues/638 | 3,732,251 | 638 |
[
"sparklemotion",
"nokogiri"
] | if /opt exists, even if it is an empty dir, it confuses the installer. I think it then looks there for libxml2 etc.
if you delete the empty dir and it works fine.
| /opt confuses installer | https://api.github.com/repos/sparklemotion/nokogiri/issues/637/comments | 2 | 2012-03-20T12:51:23Z | 2012-04-27T04:56:18Z | https://github.com/sparklemotion/nokogiri/issues/637 | 3,727,193 | 637 |
[
"sparklemotion",
"nokogiri"
] | Joining `<span>one</span><span>two</span>` inner_text elements without whitespace results in `onetwo` rather than `one two`. Votes for a single space when joining?
https://github.com/tenderlove/nokogiri/commit/be67bd3eb17bda8b08a14a512980983691376c65#lib/nokogiri/xml/node_set.rb-P7
| inner_text joins text without whitespace | https://api.github.com/repos/sparklemotion/nokogiri/issues/636/comments | 10 | 2012-03-19T02:54:50Z | 2017-04-27T16:32:40Z | https://github.com/sparklemotion/nokogiri/issues/636 | 3,704,618 | 636 |
[
"sparklemotion",
"nokogiri"
] | Reported by Andrew Crump on the nokogiri-talk mailing list:
> Hi code-crunching robots,
>
> This code using a custom xpath function returns the matching nodes on
> 1.5.0 but segfaults for me in 1.5.1 and 1.5.2:
> https://gist.github.com/2040448
>
> Thanks,
>
> Andrew.
| Custom xpath function segfault | https://api.github.com/repos/sparklemotion/nokogiri/issues/634/comments | 4 | 2012-03-16T02:23:49Z | 2020-02-02T18:52:58Z | https://github.com/sparklemotion/nokogiri/issues/634 | 3,676,760 | 634 |
[
"sparklemotion",
"nokogiri"
] | I get this:
``` text
WARNING: Invalid .gemspec format in '/Users/ben/.rvm/gems/ruby-1.9.2-p0@typerack/specifications/nokogiri-1.5.1.gemspec'
WARNING: #<ArgumentError: Illformed requirement ["#<Syck::DefaultKey:0x00000108ac9c08> 0.8.0"]>
```
Hope it is useful.
| Invalid gemspec format in 1.5.1 | https://api.github.com/repos/sparklemotion/nokogiri/issues/632/comments | 7 | 2012-03-09T15:03:06Z | 2012-07-25T13:42:52Z | https://github.com/sparklemotion/nokogiri/issues/632 | 3,584,158 | 632 |
[
"sparklemotion",
"nokogiri"
] | When attempting to deploy 1.5.1 to Heroku bamboo, the following error crashes on deployment:
2012-03-09T06:15:24+00:00 app[web.1]: WARNING: #<ArgumentError: Illformed requirement ["#<Syck::DefaultKey:0x00000008b74690> 0.8.0"]>
2012-03-09T06:15:24+00:00 app[web.1]: # -_\- encoding: utf-8 -_-
2012-03-09T06:15:24+00:00 ... | 1.5.1 broke Heroku deployment | https://api.github.com/repos/sparklemotion/nokogiri/issues/631/comments | 10 | 2012-03-09T06:20:40Z | 2012-03-09T21:03:50Z | https://github.com/sparklemotion/nokogiri/issues/631 | 3,579,067 | 631 |
[
"sparklemotion",
"nokogiri"
] | Pull request #554 broke PI insertion as specified in the nokogiri.org tutorials.
| Processing instruction insertion is broken | https://api.github.com/repos/sparklemotion/nokogiri/issues/630/comments | 0 | 2012-03-09T03:49:34Z | 2012-03-09T04:19:01Z | https://github.com/sparklemotion/nokogiri/issues/630 | 3,577,466 | 630 |
[
"sparklemotion",
"nokogiri"
] | jQuery's :first pseudo-selector implementation always returns only a single match. Nokogiri's implementation makes :first a synonym for :nth-child(1), which returns all elements that are the first child of their parents, which is a decidedly different result.
Since :first isn't part of the CSS standard, neither imp... | nokogiri's implementation of :first is different than jQuery's. | https://api.github.com/repos/sparklemotion/nokogiri/issues/628/comments | 2 | 2012-03-03T11:26:46Z | 2020-02-26T19:00:20Z | https://github.com/sparklemotion/nokogiri/issues/628 | 3,489,067 | 628 |
[
"sparklemotion",
"nokogiri"
] | Hello there, nokogiri 1.5.0 not installing
I've tried
gem install nokogiri -- .... well as -> bundle config build.nokogiri --with-xml2-include=/usr/include/libxml2/libxml --with-xml2-lib=/usr/lib
without any success
I'm using gentoo linux, I've the latest rvm and I'm using ruby 1.9.3-p125
Any directions are apprec... | libxml2 missing | https://api.github.com/repos/sparklemotion/nokogiri/issues/627/comments | 2 | 2012-03-01T18:05:10Z | 2012-03-04T18:19:23Z | https://github.com/sparklemotion/nokogiri/issues/627 | 3,459,170 | 627 |
[
"sparklemotion",
"nokogiri"
] | test_subclass_parse and test_document_parse_method both rely on the ordering of nodes in the structures - by comparing the 'to_s' output to each other.
The NOTATION entries can change place depending upon the alignment of the stars.
[\n<!NOTATION notation2 SYSTEM \"notation2File\" >\n<!NOTATION notation1 PUBLIC \"not... | test/xml/test_document.rb relies on node ordering - causes test failure. | https://api.github.com/repos/sparklemotion/nokogiri/issues/626/comments | 1 | 2012-02-29T10:53:32Z | 2012-03-18T15:30:47Z | https://github.com/sparklemotion/nokogiri/issues/626 | 3,434,374 | 626 |
[
"sparklemotion",
"nokogiri"
] | ```
require 'nokogiri'
puts Nokogiri::XML::Builder.new{ |x|
x.root{ x.comment('hi') }
}.doc.root.to_xml
```
**Expected:**
```
<root>
<!--hi-->
</root>
```
**Actual:**
```
<root>
<comment>hi</comment>
</root>
```
_...or am I misreading http://nokogiri.org/Nokogiri/XML/Builder.html#method-i-comment?_
| Builder#comment creates <comment> | https://api.github.com/repos/sparklemotion/nokogiri/issues/625/comments | 5 | 2012-02-28T20:36:30Z | 2012-04-13T12:49:27Z | https://github.com/sparklemotion/nokogiri/issues/625 | 3,425,614 | 625 |
[
"sparklemotion",
"nokogiri"
] | I've seen `<<` being used to append raw XML to a Builder, like this:
``` rb
builder = Nokogiri::XML::Builder.new do |xml|
doc.test do
doc << '<aaa><bbb/><ccc/></aaa>'
end
end
```
I also found this snippet on StackOverflow that reaches down and calles `insert` directly instead of using `<<`:
``` rb
...
do... | Raw XML | https://api.github.com/repos/sparklemotion/nokogiri/issues/624/comments | 7 | 2012-02-24T22:31:06Z | 2012-03-04T20:04:54Z | https://github.com/sparklemotion/nokogiri/issues/624 | 3,380,226 | 624 |
[
"sparklemotion",
"nokogiri"
] | The last nokogiri release was 8 months ago and while the new 2.0 roadmap looks great there are a number of fixes that would be nice to have sooner than later (Especially jruby related, I am still having to use 1.5.0beta4 on some apps).
Would a 1.5.1 or 1.6 release be possible?
| New 1.x Release? | https://api.github.com/repos/sparklemotion/nokogiri/issues/622/comments | 2 | 2012-02-21T06:28:13Z | 2012-03-04T20:58:13Z | https://github.com/sparklemotion/nokogiri/issues/622 | 3,307,147 | 622 |
[
"sparklemotion",
"nokogiri"
] | In jQuery, it's convenient to try looking for a node that follows another by doing:
``` html
<div>
<dt>blah
<dd>blah
<dt>blah
<dd>blah
</div>
```
``` javascript
$("dt").find("+dd")
```
_The above example is contrived, but it's just an illustration_
It would be nice if nokogiri also supported +sibling notati... | Should support .css("+xyz") and .css(">abc") | https://api.github.com/repos/sparklemotion/nokogiri/issues/621/comments | 14 | 2012-02-19T06:17:42Z | 2018-03-06T20:12:41Z | https://github.com/sparklemotion/nokogiri/issues/621 | 3,283,276 | 621 |
[
"sparklemotion",
"nokogiri"
] | Running the following code:
``` ruby
require "rubygems"
require "nokogiri"
class Document < Nokogiri::XML::SAX::Document; end
document = Document.new
parser = Nokogiri::XML::SAX::Parser.new document
parser.parse(" ")
```
results in the following error:
```
RuntimeError: couldn't parse document: Premature end of fi... | Inconsistent behavior of Nokogiri 1.5.0 Java | https://api.github.com/repos/sparklemotion/nokogiri/issues/620/comments | 1 | 2012-02-17T18:15:53Z | 2012-02-19T22:15:51Z | https://github.com/sparklemotion/nokogiri/issues/620 | 3,271,516 | 620 |
[
"sparklemotion",
"nokogiri"
] | With Nokogiri 1.5.0 in JRuby, calling #outer_xml on a node during Nokogiri::XML::Reader#each ends up returning the outer XML of that element _and all subsequent siblings_. The same is true of #inner_xml. This does not happen in MRI/REE, and it does not happen in pre-1.5 versions of Nokogiri at all.
Here is a failing t... | Nokogiri::XML::Reader#outer_xml is broken in JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/617/comments | 3 | 2012-02-14T22:55:29Z | 2012-03-30T18:37:33Z | https://github.com/sparklemotion/nokogiri/issues/617 | 3,227,592 | 617 |
[
"sparklemotion",
"nokogiri"
] | This script will eventually segv, but only on 1.9.3. Version of libxml2 doesn't seem to matter:
``` ruby
require "nokogiri"
buf = File.read 'test/files/dont_hurt_em_why.xml'
def inspect node
node.children.map { |c| inspect(c) }
end
loop do
inspect Nokogiri::XML(buf)
end
```
The system I'm on:
```
[apatterson@... | Segv on 1.9.3 | https://api.github.com/repos/sparklemotion/nokogiri/issues/616/comments | 29 | 2012-02-14T18:50:16Z | 2020-02-02T18:52:58Z | https://github.com/sparklemotion/nokogiri/issues/616 | 3,224,038 | 616 |
[
"sparklemotion",
"nokogiri"
] | There is a bug in Nokogiri 1.5.0 with the Nokogiri::XML::SAX::PushParser that causes this exception under JRuby v1.6.6, 1.6.5, and 1.6.4. It does _not_ break under vanilla ruby, nor under JRuby with Nokogiri 1.4.7. Here is a sample script that reproduces the problem: https://gist.github.com/1819696
```
ArrayList.jav... | Nokogiri::XML::SAX::PushParser incompatibility with JRuby in Nokogiri 1.5.0 | https://api.github.com/repos/sparklemotion/nokogiri/issues/615/comments | 5 | 2012-02-13T19:54:18Z | 2012-06-13T05:29:25Z | https://github.com/sparklemotion/nokogiri/issues/615 | 3,207,975 | 615 |
[
"sparklemotion",
"nokogiri"
] | I'm attempting to use a SAX parser on a very large XML document with a custom DTD, and don't want to replace entities with their DTD-defined values.
I can't see a way with Nokogiri::XML::SAX::Document to specify ParserOptions (to give a go with Nokogiri::XML::ParseOptions::NOENT), as the initializer for SAX::Document ... | replace_entities ignored for SAX parser (nokogiri 1.5.0-java / jruby 1.6.6) | https://api.github.com/repos/sparklemotion/nokogiri/issues/614/comments | 5 | 2012-02-10T00:39:25Z | 2024-07-02T02:40:51Z | https://github.com/sparklemotion/nokogiri/issues/614 | 3,166,253 | 614 |
[
"sparklemotion",
"nokogiri"
] | Attempting to parse HTML files on CentOS5, running ruby 1.9.2, nokogiri 1.5.0, and libxml2 2.7.8.
Parsing a file with syntax like this:
``` ruby
html = Nokogiri::HTML(File.read('index.html'))
html.css("a").each {|href| puts href.line}
```
results in "0" for every line number. If I instead parse it as xml:
``` ruby... | Nokogiri 1.5.0 on libxml2 2.7.8 reading HTML line numbers as "0" | https://api.github.com/repos/sparklemotion/nokogiri/issues/613/comments | 7 | 2012-02-07T14:38:05Z | 2018-10-27T02:54:30Z | https://github.com/sparklemotion/nokogiri/issues/613 | 3,124,763 | 613 |
[
"sparklemotion",
"nokogiri"
] | I've filed a question @ Stack Overflow, but wanted to put in an issue in case it was something you all were aware of.
Link: http://stackoverflow.com/questions/9167492/nokogiri-not-reading-parsing-structure-of-html-file-in-centos
Our test server is running CentOS 5, with yum installed libxml2 2.6.2. I've installed no... | Nokogiri not parsing/reading HTML file on CentOS | https://api.github.com/repos/sparklemotion/nokogiri/issues/612/comments | 1 | 2012-02-06T22:04:27Z | 2012-02-07T14:31:41Z | https://github.com/sparklemotion/nokogiri/issues/612 | 3,115,338 | 612 |
[
"sparklemotion",
"nokogiri"
] | Aaron, Yoko, Timothy, Mike,
You guys are doing great work, C14N on its way and all. Thanks a lot for sharing and keeping it up.
Is there a way I can send some money your way?
Best, Wolfgang
| How can I send some money your way? | https://api.github.com/repos/sparklemotion/nokogiri/issues/611/comments | 5 | 2012-02-04T17:44:08Z | 2013-05-20T21:49:58Z | https://github.com/sparklemotion/nokogiri/issues/611 | 3,094,759 | 611 |
[
"sparklemotion",
"nokogiri"
] | when i am scrapping a web page, usng nokogiri, i am getting runtime error - HTTP redirection loop: 'weburl' . how can i fix this?
| http redirection loop error | https://api.github.com/repos/sparklemotion/nokogiri/issues/610/comments | 1 | 2012-02-04T06:21:08Z | 2012-02-05T00:38:16Z | https://github.com/sparklemotion/nokogiri/issues/610 | 3,092,282 | 610 |
[
"sparklemotion",
"nokogiri"
] | Try this
```
doc = Nokogiri::HTML(<<-html)
<SCRIPT LANGUAGE=JavaScript>
<!--
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on ... | Wrongly parsed script tag content | https://api.github.com/repos/sparklemotion/nokogiri/issues/609/comments | 2 | 2012-02-02T23:05:42Z | 2014-09-10T13:20:48Z | https://github.com/sparklemotion/nokogiri/issues/609 | 3,075,993 | 609 |
[
"sparklemotion",
"nokogiri"
] | we should be able to put single quotes around attributes with XML builder
| be able to put single quotes around attributes with XML builder | https://api.github.com/repos/sparklemotion/nokogiri/issues/608/comments | 4 | 2012-02-02T05:43:56Z | 2012-03-08T23:54:13Z | https://github.com/sparklemotion/nokogiri/issues/608 | 3,063,659 | 608 |
[
"sparklemotion",
"nokogiri"
] | I'm using JRuby 1.6.5 with Ruby 1.9 compatibility and Nokogiri 1.5.0 (java). I attempted to parse an XML document using MultiXml (which defaulted to using Nokogiri as its parse) but I got a NoMethodError raised in [document.rb](https://github.com/tenderlove/nokogiri/blob/master/lib/nokogiri/xml/document.rb#L25).
Appar... | JRuby - RubyStringIO#path - NoMethodError | https://api.github.com/repos/sparklemotion/nokogiri/issues/607/comments | 4 | 2012-02-01T02:04:19Z | 2012-02-09T21:23:54Z | https://github.com/sparklemotion/nokogiri/issues/607 | 3,046,150 | 607 |
[
"sparklemotion",
"nokogiri"
] | Given the following shortened sample of a Calibre metadata 'opf' file (using schema from this standards body, http://idpf.org/), Nokogiri fails to find any meta tags using xpath. However, it works using css query.
``` ruby
text = <<-eoxml
<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/... | XPATH query fails to find any 'meta' tags in this XML document | https://api.github.com/repos/sparklemotion/nokogiri/issues/603/comments | 1 | 2012-01-25T18:05:22Z | 2019-01-05T01:59:01Z | https://github.com/sparklemotion/nokogiri/issues/603 | 2,968,712 | 603 |
[
"sparklemotion",
"nokogiri"
] | The line causing this is
```
_html = Nokogiri::HTML(@in_file_content)
```
while `@in_file_content` is a reasonable long string (approx. 32k characters) with the content of a HTML file.
### Environment
```
> nokogiri --version
# Nokogiri (1.5.0)
---
warnings: []
nokogiri: 1.5.0
ruby:
version: 1.... | Segmentation Fault in lib/nokogiri/xml/document.rb:41 | https://api.github.com/repos/sparklemotion/nokogiri/issues/602/comments | 7 | 2012-01-22T23:46:08Z | 2012-02-20T17:39:24Z | https://github.com/sparklemotion/nokogiri/issues/602 | 2,929,630 | 602 |
[
"sparklemotion",
"nokogiri"
] | Whether you use pkgin to install Ruby 1.9.2 or use rbenv to install any ruby version, nokogiri crashes with the following error:
```
-bash-4.1$ nokogiri
/home/jill/.rbenv/versions/1.8.7-p357/lib/ruby/gems/1.8/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.so: ld.so.1: ruby: fatal: libxslt.so.1: open failed: No such file or... | Solaris SmartMachine 2.6.1 - Packaged Ruby 1.9/rbenv rubies can't find libxslt.so | https://api.github.com/repos/sparklemotion/nokogiri/issues/601/comments | 6 | 2012-01-19T18:58:39Z | 2012-02-20T14:23:18Z | https://github.com/sparklemotion/nokogiri/issues/601 | 2,901,797 | 601 |
[
"sparklemotion",
"nokogiri"
] | I am getting intermittent segfaults when running this code (segfaults about 50% of the time)
```
require 'nokogiri'
require 'CGI'
html = %Q{<sec>Foo & bar</sec>}
node = Nokogiri::XML::DocumentFragment.parse(html).at('.//sec')
s = node.inner_text
node.swap %(<b>#{s}</b>) # segfault
# node.swap... | Segfault: Nokogiri 1.5.0, ruby 1.9.2p290, libxml2.7.8 | https://api.github.com/repos/sparklemotion/nokogiri/issues/600/comments | 3 | 2012-01-17T15:48:40Z | 2020-10-12T13:26:16Z | https://github.com/sparklemotion/nokogiri/issues/600 | 2,870,299 | 600 |
[
"sparklemotion",
"nokogiri"
] | Hi,
I have problems making nth-child working, here is my example:
``` ruby
gem 'nokogiri', '~> 1.5.0'
require 'nokogiri'
html = Nokogiri::HTML <<-EOS
<html>
<body>
<table>
<tr>
<td class="forum_thread_post">
first content
</td>
</tr>
<tr>
<td class="forum_thread_post">
... | CSS selector: cannot get nth child | https://api.github.com/repos/sparklemotion/nokogiri/issues/596/comments | 1 | 2012-01-11T09:25:23Z | 2012-01-11T11:07:18Z | https://github.com/sparklemotion/nokogiri/issues/596 | 2,802,192 | 596 |
[
"sparklemotion",
"nokogiri"
] | This test case will print "these should not be nil" using Nokogiri 1.4.7 and 1.5.0, but will _not_ print that using Nokogiri 1.4.1.
``` ruby
doc = Nokogiri::HTML("<a>haldo</a>")
# select the "haldo" text node
node = doc.at("a").children.first
e1 = Nokogiri::XML::Node.new('span', doc)
node.add_previous_sibling(e1)
e2 =... | regression: adding previous siblings seemingly orphans node | https://api.github.com/repos/sparklemotion/nokogiri/issues/595/comments | 4 | 2012-01-11T04:55:50Z | 2012-02-20T19:04:12Z | https://github.com/sparklemotion/nokogiri/issues/595 | 2,800,660 | 595 |
[
"sparklemotion",
"nokogiri"
] | Hello!
-1.Thank you very much for library, I am using it and like it!
-2.I am sorry if I put a question into wrong place, I wasn't able to find any forum that is more suitable. This is not problem, this is question (or request for some extra info at documentation) that I wasn't able to find at www.
-3.I need a build a... | Does library support stream XML builder like java XMLStreamWriter | https://api.github.com/repos/sparklemotion/nokogiri/issues/594/comments | 1 | 2012-01-10T08:38:31Z | 2012-01-10T17:38:07Z | https://github.com/sparklemotion/nokogiri/issues/594 | 2,780,791 | 594 |
[
"sparklemotion",
"nokogiri"
] | Hi i want to manipulate xml files where the attributes have namespace(sql server SSIS package).
I cannot query which elements has attributes' value containing "partial string".
If the attributes does not have any namespace; I can run my query.
too bad my xml contains namespaced attributes.
Just want to inform actual u... | (Feature Request/Issue) Nokogiri does not support css selector for namespaced attributes | https://api.github.com/repos/sparklemotion/nokogiri/issues/593/comments | 3 | 2012-01-07T03:38:05Z | 2012-02-21T03:38:08Z | https://github.com/sparklemotion/nokogiri/issues/593 | 2,754,821 | 593 |
[
"sparklemotion",
"nokogiri"
] | I use Nokogiri to parse an html. I need both the content and image tags in the page, so I use `inner_html` instead of `content` method. But the value returned by `content` is encoded correct, while wrongly encoded by `inner_html`. One note, the page is in Chinese and not use UTF-8 encoding.
Here is my code:
```
# enc... | Invalid html encode fetched by Nokigiri | https://api.github.com/repos/sparklemotion/nokogiri/issues/592/comments | 2 | 2012-01-06T10:33:33Z | 2021-02-16T17:04:33Z | https://github.com/sparklemotion/nokogiri/issues/592 | 2,745,908 | 592 |
[
"sparklemotion",
"nokogiri"
] | When using with Capybara and JRuby 1.6.5 (1.9 mode) the `page.html` returns something that looks like:
``` ruby
> page.html
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"...."
```
We can clearly see that `<?xml version="1.0" encoding="UTF-8">` has been i... | HTML includes XML declaration and DOCTYPE on JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/590/comments | 11 | 2012-01-03T21:26:46Z | 2016-02-17T05:39:17Z | https://github.com/sparklemotion/nokogiri/issues/590 | 2,716,041 | 590 |
[
"sparklemotion",
"nokogiri"
] | The Java version returns nil for empty attributes where the native version returns an empty string:
``` ruby
Nokogiri.XML('<node action="" />').root['action'].should == ''
```
You can find [a simple testcase on Github](https://github.com/rubiii/nokogiri_spec) and the [test results on Travis](http://travis-ci.org/#!/r... | Java version inconsistency: it returns nil for empty attributes | https://api.github.com/repos/sparklemotion/nokogiri/issues/589/comments | 2 | 2012-01-02T09:47:38Z | 2012-01-04T21:53:35Z | https://github.com/sparklemotion/nokogiri/issues/589 | 2,700,127 | 589 |
[
"sparklemotion",
"nokogiri"
] | I use Nokogiri 1.5.0 and ruby 1.9.3p0 and I got the following error:
URI::InvalidURIError:
the scheme http does not accept registry part: auto_diversen.marktplaza.nl:80 (or bad hostname?)
it appears in this code:
Nokogiri::HTML(open(url))
When I do the following I don't have the problem
open(url)
I can't reme... | Invalid URI Error when using underscore | https://api.github.com/repos/sparklemotion/nokogiri/issues/588/comments | 3 | 2011-12-21T15:44:03Z | 2021-02-16T17:04:33Z | https://github.com/sparklemotion/nokogiri/issues/588 | 2,626,196 | 588 |
[
"sparklemotion",
"nokogiri"
] | when I used Chinese ,I got some strange strings even through I used the UTF-8 encoding
`````` ruby
# encoding: utf-8
require 'nokogiri'
content = "<pre>Chinese 中文</pre>"
doc = Nokogiri::HTML(content,nil,"UTF-8")
nodes = doc.search("pre")
nodes.each do |node|
s = node.inner_html || "[... | I get something wrong with the swap (or in_context) | https://api.github.com/repos/sparklemotion/nokogiri/issues/587/comments | 10 | 2011-12-21T14:40:00Z | 2014-06-12T02:47:18Z | https://github.com/sparklemotion/nokogiri/issues/587 | 2,625,525 | 587 |
[
"sparklemotion",
"nokogiri"
] | parsing the XML below with ruby, works as expected, however parsing this with JRuby and nokogiri java results in OutOfMemoryError. It seems like java version should set the security-manager property, see http://xerces.apache.org/xerces2-j/properties.html
`<?xml version="1.0"?>
<!DOCTYPE lolz [
<!ENTITY lol "lol">
... | Java version doesn't protect against billion laughs attack | https://api.github.com/repos/sparklemotion/nokogiri/issues/586/comments | 8 | 2011-12-20T03:17:20Z | 2013-11-17T03:08:39Z | https://github.com/sparklemotion/nokogiri/issues/586 | 2,608,925 | 586 |
[
"sparklemotion",
"nokogiri"
] | This may be related to #561, but unsure:
```
/data/codeclimate/shared/bundled_gems/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/xml/node.rb:821: [BUG] Segmentation fault
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
-- Control frame information -----------------------------------------------
c:0078 p:---- s:03... | Segmentation fault -- Nokogiri 1.5.0 / Ruby 1.9.3p0 / Rails 3.1 | https://api.github.com/repos/sparklemotion/nokogiri/issues/585/comments | 26 | 2011-12-17T17:28:51Z | 2013-11-20T07:43:11Z | https://github.com/sparklemotion/nokogiri/issues/585 | 2,589,598 | 585 |
[
"sparklemotion",
"nokogiri"
] | Hello,
The way libxml2 expects to be used when installed from source is that you call 'xml2-config --cflags --libs' and it outputs the flags needed to pass to GCC so it can find its headers and libraries. That's why libxml2 puts its stuff under 'libxml2/libxml', so even if you install to /usr or /usr/local, you still... | Should use 'xml2-config' if it can be found in $PATH to find out libxml2's header and library file locations | https://api.github.com/repos/sparklemotion/nokogiri/issues/584/comments | 2 | 2011-12-15T10:56:39Z | 2012-06-07T20:27:09Z | https://github.com/sparklemotion/nokogiri/issues/584 | 2,565,323 | 584 |
[
"sparklemotion",
"nokogiri"
] | ``` bash
> jruby -v
jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]
> gem list | grep nokogiri
nokogiri (1.5.0 java)
>irb
```
And then:
``` ruby
require 'nokogiri'
s = "<!DOCTYPE html>\n<html>\n<head>\n<title>asd</title>\n<link href=\"/assets/application.cs... | Invalid encoding returned in JRuby with US-ASCII | https://api.github.com/repos/sparklemotion/nokogiri/issues/583/comments | 3 | 2011-12-13T02:13:09Z | 2012-06-13T05:08:36Z | https://github.com/sparklemotion/nokogiri/issues/583 | 2,531,959 | 583 |
[
"sparklemotion",
"nokogiri"
] | Running `rake install_gem` from a fresh git clone fails with:
```
compiling xml_schema.c
In file included from ./xml_schema.h:4:0,
from xml_schema.c:1:
./nokogiri.h:107:34: fatal error: html_sax_push_parser.h: No such file or directory
compilation terminated.
make: *** [xml_schema.o] Error 1
```
Full... | Can't install_gem from git | https://api.github.com/repos/sparklemotion/nokogiri/issues/582/comments | 7 | 2011-12-12T22:33:48Z | 2011-12-13T22:08:04Z | https://github.com/sparklemotion/nokogiri/issues/582 | 2,529,632 | 582 |
[
"sparklemotion",
"nokogiri"
] | ### Error
```unexpected '$' after 'CHILD_SELECTOR'
``````
or
```unexpected '{' after 'DESCENDANT_SELECTOR'
``````
### Trigger
Using [CSS3 Substring Matching Attribute Selectors](http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/), like this `span.error[class$="-icon"] { color: red; }`, in our C... | Nokogiri does not support CSS3 Substring Matching Attribute Selectors | https://api.github.com/repos/sparklemotion/nokogiri/issues/581/comments | 7 | 2011-12-09T21:05:59Z | 2013-06-05T10:46:08Z | https://github.com/sparklemotion/nokogiri/issues/581 | 2,506,940 | 581 |
[
"sparklemotion",
"nokogiri"
] | (using Nokogiri 1.5.0)
Missing a closing quotation mark in an attribute:
```
Nokogiri::HTML.parse('<html><body><a href="foo.org>link</a><em>stuff</em></body></html>').to_s
=> "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><a href=\"foo.org&... | Enhance handling of missing closing quotation marks in attributes | https://api.github.com/repos/sparklemotion/nokogiri/issues/580/comments | 1 | 2011-12-02T12:15:46Z | 2011-12-02T21:44:34Z | https://github.com/sparklemotion/nokogiri/issues/580 | 2,426,603 | 580 |
[
"sparklemotion",
"nokogiri"
] | (Using Nokogiri 1.5.0)
Given the following document with an unclosed 'bar' tag
doc = Nokogiri::XML.parse("<root><foo><bar>sdfsdf</foo></root>")
I'd like to find out which of the tags is missing a closing tag since I want to be a bit smarter about where to close the tag for my usecase. A... | Enhance SyntaxError messages for missing closing tags | https://api.github.com/repos/sparklemotion/nokogiri/issues/579/comments | 1 | 2011-12-02T12:06:47Z | 2012-02-05T00:44:16Z | https://github.com/sparklemotion/nokogiri/issues/579 | 2,426,554 | 579 |
[
"sparklemotion",
"nokogiri"
] | (Using Nokogiri 1.5.0)
For almost all inline tags, Nokogiri preserves space between subsequent tags, as I'd expect it to:
irb(main):004:0> Nokogiri::HTML.fragment("<em>a</em> <em>b</em>").to_s
=> "<em>a</em> <em>b</em>"
However, between sup and sub tags, the spac... | Space lost between sub and sup tags | https://api.github.com/repos/sparklemotion/nokogiri/issues/578/comments | 1 | 2011-12-02T11:41:11Z | 2012-02-20T19:29:39Z | https://github.com/sparklemotion/nokogiri/issues/578 | 2,426,387 | 578 |
[
"sparklemotion",
"nokogiri"
] | 1. Go to http://nokogiri.org/Nokogiri/XML/Builder.html
**EXPECTED**: Nice formatting.
**ACTUAL**: Synopsis has the following HTML markup displayed with line numbers:
```
<span class="ruby-identifier">builder</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-con... | Documentation is showing raw HTML formatting | https://api.github.com/repos/sparklemotion/nokogiri/issues/577/comments | 3 | 2011-12-01T22:37:21Z | 2011-12-30T22:08:37Z | https://github.com/sparklemotion/nokogiri/issues/577 | 2,421,383 | 577 |
[
"sparklemotion",
"nokogiri"
] | The simple e.g.
``` rb
html = "<p>Look at the documentation.</p>"
doc = Nokogiri::HTML(html)
puts doc.to_s
```
And the output is:
``` html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>Look at the documentation.</p></body></html>
```
I do... | How to turn off to not generate the doctype? | https://api.github.com/repos/sparklemotion/nokogiri/issues/576/comments | 4 | 2011-11-29T05:41:29Z | 2011-11-29T15:10:23Z | https://github.com/sparklemotion/nokogiri/issues/576 | 2,378,148 | 576 |
[
"sparklemotion",
"nokogiri"
] | If I have this HTML:
```
<pre>
<img src="about:blank">
<img src="about:blank">
</pre>
```
It renders like this:

If I pass it into Nokogiri and back out again:
```
Nokogiri::HTML::DocumentFragment.parse(html).to_html
```
I get HTML like this:
```
<pre>
... | Nokogiri doesn't preserve whitespace correctly inside <pre> tags | https://api.github.com/repos/sparklemotion/nokogiri/issues/575/comments | 1 | 2011-11-29T01:27:57Z | 2014-02-11T04:48:46Z | https://github.com/sparklemotion/nokogiri/issues/575 | 2,375,888 | 575 |
[
"sparklemotion",
"nokogiri"
] | page http://www.jessops.com/online.store/products/80201/show.html
After parsing
doc = Nokogiri::HTML.parse(downloaded content)
doc.to_s returns string ends with </script></body></html></style></div>
looks like html tag placed in style placed in div
doc.errors contains folowing error
Invalid char in CDATA ... | Incorrect parse !!!!! | https://api.github.com/repos/sparklemotion/nokogiri/issues/574/comments | 1 | 2011-11-23T17:29:54Z | 2011-11-23T21:36:15Z | https://github.com/sparklemotion/nokogiri/issues/574 | 2,332,326 | 574 |
[
"sparklemotion",
"nokogiri"
] | XML::Builder should undefine `#p` so that it can be used for HTML `<p>` tag (without having to use an underscore). It's too common in HTML and the `#p` method isn't really a useful method in this context.
| Builder and the #p method | https://api.github.com/repos/sparklemotion/nokogiri/issues/573/comments | 1 | 2011-11-23T03:59:12Z | 2012-02-20T20:01:31Z | https://github.com/sparklemotion/nokogiri/issues/573 | 2,326,338 | 573 |
[
"sparklemotion",
"nokogiri"
] | **Summary** (from conversation below):
- In a fragment, `foo` and `./foo` match nodes at the top of the fragment, but `/foo` does not.
- In a fragment, neither `//foo` nor `.//foo` match items at the top of the fragment.
- In a fragment, `//foo` does not match any descendant items, but `.//foo` does.
**Original Issue*... | XPath queries in fragments do not properly find root nodes | https://api.github.com/repos/sparklemotion/nokogiri/issues/572/comments | 4 | 2011-11-21T22:53:58Z | 2022-05-20T03:36:42Z | https://github.com/sparklemotion/nokogiri/issues/572 | 2,310,674 | 572 |
[
"sparklemotion",
"nokogiri"
] | ```
$ rake
(in /Users/yoko/Documents/workspace/Ranunculus)
cp tmp/java/nokogiri/nokogiri.jar lib/nokogiri/nokogiri.jar
/Users/yoko/Projects/nokogiri/jruby/bin/jruby -w -I.:lib:bin:test:. -e 'require "rubygems"; require "minitest/autorun"; require "test/test_convert_xpath.rb"; require "test/test_css_cache.rb"; require "... | JRuby 1.9 mode causes dead lock while running rake | https://api.github.com/repos/sparklemotion/nokogiri/issues/571/comments | 2 | 2011-11-18T17:05:23Z | 2012-04-11T17:39:41Z | https://github.com/sparklemotion/nokogiri/issues/571 | 2,282,195 | 571 |
[
"sparklemotion",
"nokogiri"
] | https://github.com/jbarnette/hoe-debugging/issues/1
| Tests refuse to run due to hoe-debugging bug | https://api.github.com/repos/sparklemotion/nokogiri/issues/570/comments | 1 | 2011-11-18T11:39:40Z | 2012-02-05T01:07:15Z | https://github.com/sparklemotion/nokogiri/issues/570 | 2,279,269 | 570 |
[
"sparklemotion",
"nokogiri"
] | The fix for the namespace issue exists and is checked into GIT. But a new officlal java release is still missing. The current official version is 1.5.0.
Could you please release a new version with the fix from #492?
Regards Klaas
| Release new java version with fix of issue #492 | https://api.github.com/repos/sparklemotion/nokogiri/issues/569/comments | 1 | 2011-11-17T10:50:51Z | 2011-11-17T14:21:19Z | https://github.com/sparklemotion/nokogiri/issues/569 | 2,267,419 | 569 |
[
"sparklemotion",
"nokogiri"
] | I use ruby 1.9.2p290 and nokogiri version 1.5.0. When I have a
xsd-Document simplest.xsd:
```
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema >
</xs:schema >
```
and want to load it as schema with:
```
require 'noko'
a = Nokogiri::XML(File.open("simplext.xsd","r"))
b = Nokogiri::XML::Schema.from_document a
... | When xmlns:xs != "http://www.w3.org/2001/XMLSchema" the Document is not recognized as scheme document | https://api.github.com/repos/sparklemotion/nokogiri/issues/568/comments | 2 | 2011-11-16T17:50:46Z | 2011-11-17T07:29:17Z | https://github.com/sparklemotion/nokogiri/issues/568 | 2,259,443 | 568 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.