File: strong-id.t

package info (click to toggle)
libhtml-lint-perl 2.32%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 356 kB
  • sloc: perl: 1,739; makefile: 6
file content (45 lines) | stat: -rw-r--r-- 939 bytes parent folder | download | duplicates (2)
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
42
43
44
45
#!perl

use warnings;
use strict;

use lib 't/';
use Util;

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>