/[suikacvs]/markup/html/whatpm/Whatpm/HTML/Serializer.pm
Suika

Diff of /markup/html/whatpm/Whatpm/HTML/Serializer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Sun Mar 2 03:39:41 2008 UTC revision 1.5 by wakaba, Sat May 24 12:04:21 2008 UTC
# Line 51  sub get_inner_html ($$$) { Line 51  sub get_inner_html ($$$) {
51          $attr_value =~ s/&/&/g;          $attr_value =~ s/&/&/g;
52          $attr_value =~ s/</&lt;/g;          $attr_value =~ s/</&lt;/g;
53          $attr_value =~ s/>/&gt;/g;          $attr_value =~ s/>/&gt;/g;
54          $attr_value =~ s/"/&quot;/g;          $attr_value =~ s/"/&quot;/g; # in attribute mode
55          $attr_value =~ s/\xA0/&nbsp;/g;          $attr_value =~ s/\xA0/&nbsp;/g;
56          $s .= $attr_value . '"';          $s .= $attr_value . '"';
57        }        }
# Line 64  sub get_inner_html ($$$) { Line 64  sub get_inner_html ($$$) {
64          spacer => 1, wbr => 1,          spacer => 1, wbr => 1,
65        }->{$tag_name};        }->{$tag_name};
66    
67        $s .= "\x0A" if $tag_name eq 'pre' or $tag_name eq 'textarea';        $s .= "\x0A" if {pre => 1, textarea => 1, listing => 1}->{$tag_name};
68    
69        if (not $in_cdata and {        if (not $in_cdata and {
70          style => 1, script => 1, xmp => 1, iframe => 1,          style => 1, script => 1, xmp => 1, iframe => 1,
# Line 84  sub get_inner_html ($$$) { Line 84  sub get_inner_html ($$$) {
84          $value =~ s/&/&amp;/g;          $value =~ s/&/&amp;/g;
85          $value =~ s/</&lt;/g;          $value =~ s/</&lt;/g;
86          $value =~ s/>/&gt;/g;          $value =~ s/>/&gt;/g;
87          $value =~ s/"/&quot;/g;          #$value =~ s/"/&quot;/g;
88          $value =~ s/\xA0/&nbsp;/g;          $value =~ s/\xA0/&nbsp;/g;
89          $s .= $value;          $s .= $value;
90        }        }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24