File: strong-id.t

package info (click to toggle)
libhtml-lint-perl 2.20%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 304 kB
  • ctags: 64
  • sloc: perl: 1,014; sh: 48; makefile: 20
file content (41 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use warnings;
use strict;
require 't/LintTest.pl';

checkit( [
    [ 'attr-unknown' => qr/Unknown attribute "bongo" for tag <strong>/ ],
], [<DATA>] );

=pod

    HTML::Lint 2.02 and weblint, Red Hat EL 3

    This should result in no warnings:

    echo '<html><head><title>qwer</title></head><body><strong
    id="asdf">asdf</strong></body></html>' | weblint -
    - (1:45) Unknown attribute "id" for tag <strong>

    but it gives:

        - (1:45) Unknown attribute "id" for tag <strong>

    id is a core attribute in HTML4/XHTML1: http://www.w3.org/TR/html4/html40.txt

=cut

__DATA__
<HTML>
    <HEAD>
        <TITLE>Test stuff</TITLE>
    </HEAD>
    <BODY BGCOLOR="white">
        <p>
        A test for <a href="http://code.google.com/p/html-lint/issues/detail?id=2">this bug</a>.
        </p>
        <p>
        <strong bongo="This">Bad</strong>
        <strong id="This">Bad</strong>
        </p>
    </BODY>
</HTML>