Changeset 23229
- Timestamp:
- 11/11/08 14:43:04 (5 years ago)
- Location:
- lang/perl/XML-Liberal/trunk
- Files:
-
- 4 modified
- 1 moved
-
MANIFEST (modified) (2 diffs)
-
lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm (modified) (1 diff)
-
t/bad/BAD-charset.xml (modified) (1 diff)
-
t/bad/BAD-undeclared-ns-element.xml (modified) (1 diff)
-
t/bad/BAD-xhtml-empty-element-tag.xml (moved) (moved from lang/perl/XML-Liberal/trunk/t/bad/BAD-br.xml) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/XML-Liberal/trunk/MANIFEST
r23119 r23229 42 42 t/bad/BAD-ampersand.xml 43 43 t/bad/BAD-atttibute.xml 44 t/bad/BAD-br.xml45 44 t/bad/BAD-charset.xml 46 45 t/bad/BAD-chr-0.xml … … 87 86 t/bad/BAD-unquoted-nbsp.xml 88 87 t/bad/BAD-unquoted.xml 88 t/bad/BAD-xhtml-empty-element-tag.xml -
lang/perl/XML-Liberal/trunk/lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm
r23129 r23229 7 7 my $self = shift; 8 8 my($xml_ref) = @_; 9 my $match = $$xml_ref =~ s{<(?: br|hr|img|area|base(?:font)?|col|frame|input|isindex|link|meta(?#|param))(?:\s[^>]*)?(?<!/)(?=>)}9 my $match = $$xml_ref =~ s{<(?:area|base(?:font)?|[bh]r|col|frame|img|input|isindex|link|meta(?#|param))(?:\s[^>]*)?(?<!/)(?=>)} 10 10 {$& /}g; 11 11 return 1 if $match; 12 12 13 Carp::carp("Can't find empty < br>, <hr>, <img>, <area>, <base>, <basefont>, <col>, <frame>, <input>, <isindex>, <link> nor <meta> tags: line $self->{line} pos $self->{pos}: $self->{error}");13 Carp::carp("Can't find empty <area>, <base>, <basefont>, <br>, <hr>, <col>, <frame>, <img>, <input>, <isindex>, <link> nor <meta> tags: line $self->{line} pos $self->{pos}: $self->{error}"); 14 14 return; 15 15 } -
lang/perl/XML-Liberal/trunk/t/bad/BAD-charset.xml
r23110 r23229 1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version= "1.0" 2 encoding ='uTf-8'?> 2 3 <foo>�ӂ�������</foo> -
lang/perl/XML-Liberal/trunk/t/bad/BAD-undeclared-ns-element.xml
r23110 r23229 1 1 <?xml version="1.0"?> 2 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://www.rssboard.org/rss-0.91.dtd"> 3 <!-- comment node --> 2 4 <rss> 3 5 <content:encoded>foo</content:encoded> -
lang/perl/XML-Liberal/trunk/t/bad/BAD-xhtml-empty-element-tag.xml
r23110 r23229 1 1 <?xml version="1.0"?> 2 <xhtml><br><hr><img src="foobar.jpg"></xhtml> 2 <xhtml><br><hr 3 ><img src="foobar.jpg"></xhtml>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)