Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30504

Make image tag and attributes output W3C compliant

    XMLWordPrintable

Details

    Description

      in the content_fields.html.twig template, for the ezimage_field block, we have this piece of code

      {% for attrname, attrvalue in attrs if attrvalue %}{{ attrname }}="{{ attrvalue }} " {% endfor %}
      

      So, when you output an image using this default template you may end with something like <img src="img.jpg" width="400 " height="300 " />

      Please note the blank spaces after the 400 and the 300.

      This blank space make the w3c validator output erros saying things like

       Bad value 300   for attribute height on element img: Expected a digit but saw   instead.
      
      From line 329, column 70; to line 329, column 202

      Is an easy pick, i will take care of .

      Attachments

        Activity

          People

            Unassigned Unassigned
            desorden desorden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: