Unnecessary quote sign after custom attribute for the <A> tag

Issues related to hyperlinks and web site navigation.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/links.html
Post Reply
sergwerk
 
 
Posts: 4
Joined: Tue Apr 24, 2018 2:12 pm

Unnecessary quote sign after custom attribute for the <A> tag

Post by sergwerk » Tue Apr 24, 2018 2:38 pm

By adding the <download> custom attribute for the <A> ancor tag ("Edit Hyperlink" menu),
WYSIWYG 12.5.1 inserts after this attribute one quote (") sign.
HTML gets no <download>, but <download"> record.

<a href="images/01.jpg" download">File download</a>

Any idea why?

User avatar
Pablo
 
Posts: 14032
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by Pablo » Tue Apr 24, 2018 2:53 pm

Added attributes must be quoted: name="value" (see instructions). So, 'download' is not supported.

sergwerk
 
 
Posts: 4
Joined: Tue Apr 24, 2018 2:12 pm

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by sergwerk » Tue Apr 24, 2018 3:00 pm

The value of attributes must be quoted, but not attributes himself (see instructions).
<download> attribute has no values.
All the attributes without values are not supported or the <download> only?

Thanks.

User avatar
BaconFries
 
 
Posts: 4143
Joined: Thu Aug 16, 2007 7:32 pm

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by BaconFries » Tue Apr 24, 2018 3:18 pm

The attribute must be written as such download="yourimage" not download or download" Also note that download=" " is a feature of HTML5 so the Doctype of page must be set to this.
Incorrect ❌
<a href="images/01.jpg" download">File download</a>
Correct ✔
<a href="images/01.jpg" download="myimage">File download</a>

sergwerk
 
 
Posts: 4
Joined: Tue Apr 24, 2018 2:12 pm

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by sergwerk » Tue Apr 24, 2018 3:37 pm

The both are correct actually.
Syntax the download attribute is: <a download="filename">
Value <filename> is optional.
This specifies the new filename (if you wish the new one) for the downloaded file.
But is not one must.
If the value is omitted, the original filename is used.

https://www.w3schools.com/tags/att_a_download.asp

User avatar
Pablo
 
Posts: 14032
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by Pablo » Tue Apr 24, 2018 3:44 pm

I was referring to custom attribute section of the text. It only supports attributes with values.
This is related to the way the text editor (MS) works internally, you cannot use single words. Attributes must be in the format: name="value"

What you can try is to use download="" (empty value)

sergwerk
 
 
Posts: 4
Joined: Tue Apr 24, 2018 2:12 pm

Re: Unnecessary quote sign after custom attribute for the <A> tag

Post by sergwerk » Tue Apr 24, 2018 3:58 pm

Oh, I see.
Provisionally being it is an acceptable solution.
I'm curious how various browsers will react to the trick.
Also in the future.
Worst case is the rare construction <= ""> easy to fish out of the HTML by hand.

Thanks for the rapid help!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests