Sync with Latest HTML5lib
Some more tweaks
This commit is contained in:
parent
fd183eac04
commit
8846b2cda5
5 changed files with 48 additions and 27 deletions
|
@ -1,5 +1,4 @@
|
|||
require 'html5lib/constants'
|
||||
require 'jcode'
|
||||
|
||||
module HTML5lib
|
||||
|
||||
|
@ -309,7 +308,7 @@ class HTMLSerializer
|
|||
if @quote_attr_values or v.empty?
|
||||
quote_attr = true
|
||||
else
|
||||
quote_attr = (SPACE_CHARACTERS.join('') + "<>\"'").each_char.any? {|c| v.include?(c)}
|
||||
quote_attr = (SPACE_CHARACTERS + %w(< > " ')).any? {|c| v.include?(c)}
|
||||
end
|
||||
v = v.gsub("&", "&")
|
||||
if encoding
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue