From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: html5 generation minor bug Date: Fri, 27 Dec 2013 13:10:06 -0500 Message-ID: References: <8738legqd2.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwbrU-0007ML-4S for emacs-orgmode@gnu.org; Fri, 27 Dec 2013 13:10:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwbrL-0007fr-1G for emacs-orgmode@gnu.org; Fri, 27 Dec 2013 13:10:16 -0500 Received: from mail.rickster.com ([204.62.15.78]:33852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwbrK-0007dp-TZ for emacs-orgmode@gnu.org; Fri, 27 Dec 2013 13:10:06 -0500 In-Reply-To: <8738legqd2.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 2013-12-27 12:23, Bastien wrote: > Rustom Mody writes: > > When the html-doctype is set to html5 the generator still generates > name attributes in links which is not correct html5 > http://dev.w3.org/html5/markup/a.html#a-constraints > > Can you give an example of what it does and what it should do? Rustom is referring to the fact that the `name' attribute has been marked obsolete in HTML5. While the html5 spec suggests using the id attribute on a surrounding container rather than a named anchor, the id attribute is still valid on an anchor in html5. In fact, ox-html already has support for handling the issue: (defcustom org-html-allow-name-attribute-in-anchors t "When nil, do not set \"name\" attribute in anchors. By default, anchors are formatted with both \"id\" and \"name\" attributes, when appropriate." :group 'org-export-html :version "24.4" :package-version '(Org . "8.0") :type 'boolean) Rustom- For now, just set this variable to nil and the anchors will be exported with an id and no name attribute. If `org-export-allow-BIND' is true, putting the following in the head of the document will work: #+BIND: org-html-allow-name-attribute-in-anchors nil Bastien- I will look at making this the default when i have time if the doctype is html5 (`org-html-html5-p' is true), but it requires some work to get the info structure passed down to `org-html--anchor'.