SSWConsulting / SSW.CodeAuditor

SSW Code Auditor V2
7 stars 6 forks source link

🐛 Custom Rule - Non-lowercase attribute rule should be ignored for SVG #878

Closed andrewwaltosssw closed 6 months ago

andrewwaltosssw commented 6 months ago

Cc: @tombui99

Hi Tom

Describe the Bug

Report shows Code Error for SVG element violating lowercase attribute rule however the rule states that camelCase in SVG elements should not be a violation.

Image Figure: Screenshot of code snippet tagged for violating lowercase attribute rule

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://codeauditor.com/htmlhint/6a99477f-c494-4705-5fe1-6e3be7823f72
  2. Click on: Image Figure: screenshot of Code results pointing to SVG element violation
  3. See error

Expected Behavior

Expecting SVG elements to not raise this error type

Tasks

More Information

Environment

Thanks!

tombui99 commented 6 months ago

cc: @william-liebenberg @adamcogan

As per my conversation with @william-liebenberg , because this HTML rule comes default with the library, we have no control over it; therefore, we would need to rewrite a new custom rule on our end.

To myself,

tombui99 commented 6 months ago

cc @andrewwaltosssw @william-liebenberg @adamcogan

Investigate and Fix

Done - Custom rule was configured to ignore known properties of SVG such as "viewBox" which is no longer reported

See latest scan on https://tina.io/ https://codeauditor.com/htmlhint/6e05cf30-a328-4ae1-d68a-e0ed5494d0c8