• Resolved GermanKiwi

    (@germankiwi)


    Hi again, since 2.1.3 I noticed a change in behaviour of the MP3 link which is underneath the “Download Files” heading on each individual sermon page.

    The link URL itself is fine, but the entire anchor tag now looks like this:

    <a href="https://www.example.com/wp-content/uploads/sermons/2017-03-12.mp3" class="sermon-attachments" download="true">

    The problem here is the download attribute. It shouldn’t be set to a value of “true” like that. Otherwise – at least in Chrome – the browser will download the file as “true.mp3” rather than using the original file name, “2017-03-12.mp3”.

    This is explained here: https://www.w3schools.com/tags/att_a_download.asp

    “The value of the [download] attribute will be the name of the downloaded file. There are no restrictions on allowed values, and the browser will automatically detect the correct file extension and add it to the file. If the value is omitted, the original filename is used.”

    Therefore the preferred syntax, as shown in the examples on that web page, is to give the download attribute no value at all, like this:

    <a href="https://www.example.com/wp-content/uploads/sermons/2017-03-12.mp3" class="sermon-attachments" download>

    Can you kindly fix that please? ??

    • This topic was modified 7 years, 7 months ago by GermanKiwi.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Download link contains incorrectly formatted attribute’ is closed to new replies.