localwiki/sapling — Issue #24: Make anchors use id instead of name
Author: philipn
Created: 2011-11-24 09:53:54+00:00
State: open

We (and CKEditor) currently use this kind of anchor(shown inside a heading as an example):

{{{

First section

}}}

CKeditor in addition allows children in the element, but this might get confusing so we don't allow that.

However, the "name" attribute of the element is deprecated in HTML5, and instead a fragment link will match any element's "id" attribute. We should switch to this and either do:

We (and CKEditor) currently use this kind of anchor(shown inside a heading as an example):

{{{

First section

}}}

or at least this:

{{{

First section

}}}

The htmlFilter in CKeditor has to be customized to allow the latter case. Currently it would strip out the childless element unless it has a "name" attribute.