Sync with Latest HTML5lib

Some more tweaks
This commit is contained in:
Jacques Distler 2007-06-06 08:12:03 -05:00
parent fd183eac04
commit 8846b2cda5
5 changed files with 48 additions and 27 deletions

View file

@ -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("&", "&amp;")
if encoding