[opencms-dev] Interesting Behaviour: WYSIWYG editor removes empty anchors

Geoff Winkless opencms at geoff.dj
Tue Apr 6 11:56:02 CEST 2004


I've searched for this one (honest!).

Some bizarre behaviour: when using the WYSIWYG editor on OpenCMS 5.0.1
to edit a file which has empty anchors (eg:

<a name="wibble"></a>some text to jump to

the tags are removed.

If you do

<a name="wibble>some text to jump to</a>

the tags remain. Unsure if this is intentional but it's a gotcha to
watch out for, since quite a few HTML designers I know use empty name
anchors.

The w3c is somewhat ambiguous:

===============================

http://www.w3.org/TR/REC-html40/struct/links.html#adef-name-A

Note. User agents should be able to find anchors created by empty A
elements, but some fail to do so. For example, some user agents may not
find the "empty-anchor" in the following HTML fragment:

<A name="empty-anchor"></A>
<EM>...some HTML...</EM>
<A href="#empty-anchor">Link to empty anchor</A>

===============================

It seems that although not recommended, empty anchors are nonetheless
valid HTML.

Geoff


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the opencms-dev mailing list