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

[patch included] ezimage.tpl may leave <a> tag unclosed, breaks XHTML

    XMLWordPrintable

Details

    Description

      The content/view/ezimage.tpl template may output link tag (<a> </a>) around its main <img /> tag. In case the image file is missing, the <img /> nor </a> tags are not being output at all, yet, the opening <a> tag is being output.

      This breaks (X)HTML compliance and causes ugly artifacts in some mainstream browsers.

      This is caused by opening tag being output outside of the main

      {section show=...} which decided whether <img /> and closing </a> will be output.

      Attached patch fixes it by moving relevant lines into that {section show=...}

      area.

      Steps to reproduce
      • use content/view/ezimage.tpl template with link (pass a href attribute)
      • display page, the link is being output correctly
      • remove image file and its thumbnails (aliases) from server from storage/ folder
      • display page again, only the opening tag of <a> is being output.

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            dexen dexen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: