We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, we have found a strange issue in Nokogiri (latest version).
Using this code:
html = Nokogiri::XML::Builder.new do |html| html.doc.create_internal_subset( 'html', '-//W3C//DTD XHTML 1.0 Transitional//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' ) html.html { html.body { html.a(:href=>'url', :name=>'name') } } end p html.doc.to_s
the resulting HTML will be:
<?xml version=\"1.0\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <body> <a href=\"url\" name=\"name\" id=\"name\"></a> </body> </html>
as you can see, the anchor has an additional id attribute that was not given.
However, if we remove the doctype definition it doesn't get added.
How come?
Thanks, Team Iguana
The text was updated successfully, but these errors were encountered:
Because, apparently, libxml2 is that good.
http://www.w3.org/TR/xhtml1/#h-4.10
Sorry, something went wrong.
Oh, well, awesome :) Thanks!
No branches or pull requests
Hi,
we have found a strange issue in Nokogiri (latest version).
Using this code:
the resulting HTML will be:
as you can see, the anchor has an additional id attribute that was not given.
However, if we remove the doctype definition it doesn't get added.
How come?
Thanks,
Team Iguana
The text was updated successfully, but these errors were encountered: