magento/magento-coding-standard

"Avoid using self-closing tag" rule is false positive with inline svg

plumrocket opened this issue · 2 comments

As SVG content must be in XML format it must be excluded from HTML validation.

Preconditions

  1. Installed Magento Coding Standard V19 or above

Steps to reproduce

  1. Add inline svg to test.html file
  2. Run vendor/bin/phpcs --severity=10 --standard=Magento2 --ignore-annotations test.html

Expected result

  1. No errors appear

Actual result

  1. Errors are appear
    Avoid using self-closing tag with non-void html element - <rect x="12" width="439" height="344" fill="url(#pattern0)"/>

Hi @plumrocket. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


This is still an issue