Skip to content

SVG attributes flagged as proprietary #903

Closed
@cqcallaw

Description

@cqcallaw

The following HTML input to tidy (build from 1889880 on the next branch) validates with zero errors and zero warnings on https://validator.w3.org/nu/#file, but generates the following warnings in tidy. The "proprietary" attributes seem to be well-defined in section A.3.7 of the SVG 1.1 DTD, so this looks like a simple implementation gap that can be filled by adding the attributes to attrs.h, attrs.c, and attrsdict.c If so, I can contribute a pull request.

Tidy Output

$ ./build/cmake/tidy -i -w 120 svg.html 
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-width"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-linecap"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-linejoin"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-miterlimit"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-opacity"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke-dasharray"
line 8 column 9 - Warning: <svg> proprietary attribute "fill"
line 8 column 9 - Warning: <svg> proprietary attribute "stroke"
Info: Document content looks like HTML5
Tidy found 8 warnings and 0 errors!
...

HTML

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>SVG sample</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke-width="2" stroke-linecap="butt" stroke-linejoin="round" stroke-miterlimit="4" stroke-opacity="1" stroke-dasharray="none" fill="currentColor" stroke="currentColor">
            <path d="m 0.75,12.0 11.25,-9.0 4.5,3.375 0.0,-1.5 2.25,0.0 0.0,3.375 4.5,3.75 -2.25,0.0 0.0,9.0 -5.625,0.0 0.0,-7.5 -6.75,0.0 0.0,7.5 -5.625,0.0 0.0,-9.0 z" />
        </svg>
    </body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions