Project

General

Profile

Bug #87992

Updated by Stephan Großberndt about 5 years ago

In one of my projects (which I'm upgrading from 7 to 9), the customer uses a lot of anchors in longer texts, to enable the visitor to jump back and forth with links in the form of @#a-marker-here@ `#a-marker-here` or @#another-marker-there@. `#another-marker-there`. This is supported by the "anchor" command from CKEditor. Unfortunately TYPO3 always adds an @href@ `href` attribute to it, when saving to or loading from the database, which means, that CKEditor does not recognise it as anchor anymore but as a link. 

 If the anchor has content (e.g. @<a `<a name="special-section">Some special about this</a>@) this</a>) TYPO3 renders a normal link because of the added href. The CKEditor though does not recognise it as an anchor anymore. If the anchor has no content (e.g. @<a name="other-important-section"></a>@) `<a name="other-important-section"></a>`) the link is removed by CKEditor. CKEditor because an empty a[href] does not make sense. In the frontend though this is rendered as a link the with current page title as content. 

 The intended output in the frontend is @<a `<a name="some-section">About the project</a>@, project</a>`, if I created the anchor with content marked text, or @<a name="some-section></a>@ `<a name="some-section></a>` if I created an anchor without content. text. 

 Solution: Support anchors without missing href in HTML parser and typolink function: 

 Database save/load should not add href 
 CKEditor should not remove empty anchors 
 Frontend rendering should not add content to anchors without href function. 

 Release: I experienced it with 9.5.5 but from the code, this would be present in master too.

Back