emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* html5 generation minor bug
@ 2013-12-27 17:20 Rustom Mody
  2013-12-27 17:23 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Rustom Mody @ 2013-12-27 17:20 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2013-12-27 17:20 html5 generation minor bug Rustom Mody
@ 2013-12-27 17:23 ` Bastien
  2013-12-27 18:10   ` Rick Frankel
  2013-12-28  1:50   ` Rustom Mody
  0 siblings, 2 replies; 7+ messages in thread
From: Bastien @ 2013-12-27 17:23 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Hi Rustom,

Rustom Mody <rustompmody@gmail.com> 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?

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2013-12-27 17:23 ` Bastien
@ 2013-12-27 18:10   ` Rick Frankel
  2014-01-04 14:36     ` Bastien
  2013-12-28  1:50   ` Rustom Mody
  1 sibling, 1 reply; 7+ messages in thread
From: Rick Frankel @ 2013-12-27 18:10 UTC (permalink / raw)
  To: emacs-orgmode

On 2013-12-27 12:23, Bastien wrote:
> Rustom Mody <rustompmody@gmail.com> 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'.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2013-12-27 17:23 ` Bastien
  2013-12-27 18:10   ` Rick Frankel
@ 2013-12-28  1:50   ` Rustom Mody
  1 sibling, 0 replies; 7+ messages in thread
From: Rustom Mody @ 2013-12-28  1:50 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Fri, Dec 27, 2013 at 10:53 PM, Bastien <bzg@gnu.org> wrote:
> Hi Rustom,
>
> Rustom Mody <rustompmody@gmail.com> 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?

Heres an org-file:
--------------
#+TITLE: Quotes and References
#+OPTIONS: toc:nil
* Soul
:PROPERTIES:
:CUSTOM_ID: soul
:END:
Nobel prize winner Wislawa Szymborska's poem on
[[http://www.poemhunter.com/poem/a-few-words-on-the-soul/][the soul]]
is a
poet's way of showing how dualistic our habitual thinking is
--------------
This is as far as I can see the offending line produced by html generation
--------------
<h2 id="soul"><a id="sec-1" name="sec-1"></a><span
class="section-number-2">1</span> Soul</h2>
--------------
You can check for yourself
Generate the html yourself and use the validator here
http://validator.w3.org/check

Note 1. there are warnings, not errors
Note 2. Ive just cut out one sample from a file of mine. I could cut
down further

emacs version 24.3.1
org-version 8.2.4

emacs started with -Q
org put into path
then execute
(setq org-html-doctype "html5")

[On another note choosing xhtml doctype in 2013 seems a strange
default given that xhtml is one of those standards that 'never
happened'
http://news.cnet.com/8301-17939_109-10281477-2.html
Of course I need to add the disclaimer that I know too little to
distinguish hype from fact in web matters]

Regards
Rusi

-- 
http://www.the-magus.in
http://blog.languager.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2013-12-27 18:10   ` Rick Frankel
@ 2014-01-04 14:36     ` Bastien
  2014-01-08 19:01       ` Rick Frankel
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2014-01-04 14:36 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Hi Rick,

Rick Frankel <rick@rickster.com> writes:

> 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'.

Sure -- please let us know when you have more time for this,
I'll not touch anything in this area.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2014-01-04 14:36     ` Bastien
@ 2014-01-08 19:01       ` Rick Frankel
  2014-01-08 23:44         ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Rick Frankel @ 2014-01-08 19:01 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien-

On 2014-01-04 09:36, Bastien wrote:
> 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'.
> 
> Sure -- please let us know when you have more time for this,
> I'll not touch anything in this area.

Re-visiting this, it seems to me that there is really --- with current
browsers --- no reason to default to having both a name and id
attribute on anchors (`org-html-allow-name-attribute-in-anchors' t).

Having both is a throwback to early browsers (ie6 anyone :) that
wouldn't recognize the id attribute on anchors.

Changing the default to nil, would fix the issue with html5 without, i
believe, having any negative effect on (x)html4 output.

Agreed?

rick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: html5 generation minor bug
  2014-01-08 19:01       ` Rick Frankel
@ 2014-01-08 23:44         ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2014-01-08 23:44 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Rick Frankel <rick@rickster.com> writes:

> Changing the default to nil, would fix the issue with html5 without, i
> believe, having any negative effect on (x)html4 output.
>
> Agreed?

Agreed, let's make this change in master, since it's not really a
bugfix.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-01-08 23:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 17:20 html5 generation minor bug Rustom Mody
2013-12-27 17:23 ` Bastien
2013-12-27 18:10   ` Rick Frankel
2014-01-04 14:36     ` Bastien
2014-01-08 19:01       ` Rick Frankel
2014-01-08 23:44         ` Bastien
2013-12-28  1:50   ` Rustom Mody

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).