nokogiri
nokogiri copied to clipboard
Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
The CSS selector parser we have is complex, and selector parsing is really a separable concern from Nokogiri proper. It would be nice if we were able to use an...
**Please describe the bug** ```ruby Nokogiri::HTML::Document.parse("").create_text_node("asdf").to_s ``` results in ``` Unhandled Java exception: java.lang.NullPointerException java.lang.NullPointerException: null isHtmlScript at nokogiri/internals/SaveContextVisitor.java:812 enter at nokogiri/internals/SaveContextVisitor.java:833 accept at nokogiri/XmlText.java:75 native_write_to at nokogiri/XmlNode.java:1352 call at...
**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...
**What problem is this PR intended to solve?** This pull request adds a GitHub Actions Workflow that profiles memory usage from using Nokogiri to parse and serialize HTML content. The...
I'm trying to pretty print a large (some MB) XML file using the following stylesheet: ```xml ``` The transformation: ```ruby Nokogiri::XSLT('pretty.xsl')).transform(xml) ``` While this works for small XML files, the...
**Please describe the bug** It's not clear to me why we're using a namespace cache in the JRuby implementation. It is causing problems in edge cases like #1247 that I...
The Nokogiri::HTML4::EncodingReader class is used to try to detect encoding of HTML4 documents when they have ambiguous encoding. Recently, [a REDOS vulnerability was found in this code](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8). There are other...
Memory leak is observed while searching in a document with undefined namespace prefix. ```text # Nokogiri (1.7.0.1) --- warnings: [] nokogiri: 1.7.0.1 ruby: version: 2.3.1 platform: x86_64-linux description: ruby 2.3.1p112...
This PR is for a set of accumulated changes in the C extension around libxml2 error handling. I'd like to, whenever possible, avoid raising an exception from a native C...
**What problem is this PR intended to solve?** This PR is intended to address #2494, issues with the reparenting of nodes with prefix collisions. Closes #2494 **Have you included adequate...