[dokuwiki] Re: invalid anchors

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 07 Feb 2006 19:23:54 +0000

Anika Henke wrote:

Hallo list!

I came across a certain problem with html anchors:

Each "name" and "id" attribute is generated out of each headline. But names/ids must not begin with a digit! All other forbidden characters are caught with the help of cleanID().

The question is: What should be done? Should the digits just be omitted? Or should those anchors have a certain letter prefixed? ('x'? Or 'n'?)

It's also a question of usability. It could confuse users to see an anchor "ways_to_do_it_better", whereas the headline clearly reads "3 ways to do it better" ... Okay, bad example. But I bet you can imagine worse scenarios ...

But then again ... they're just anchors, and not that important ...!?


Anika
Hi Anika,

Great work so far on bring dokwiki's xhtml into line. :-)

I'd be inclined to go further to prevent non-unique ids.

e.g.

hd1_2_ways_to_do_it_better
hd2_1st_way
hd3_2nd_way
hd4_3_more_ways_to_do_it_better
hd5_1st_way
hd6_2nd_way
...

Perhaps even allowing the renderer to have a prefix specified, to allow web pages with multiple wiki pages (e.g. sidebars or includes) to avoid id collisions.

Cheers,

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: