Details
- 
    
Bug
 - 
    Resolution: Unresolved
 - 
    
Major
 - 
    None
 - 
    17.5.0
 - 
    None
 
- 
        Unknown
 - 
        
 
Description
Annotations are displayed in the comment section with a link on the selection text. These links appear to be broken: they have an anchor, but the corresponding anchor doesn't exist in the rendered document content.
Here is a case to reproduce the issue. The page was imported using the confluence-xml input filter stream, importing this package: https://github.com/xwiki-contrib/confluence/tree/master/confluence-xml/src/test/resources/confluencexml/annotations
Note: the state of the comments isn't set. Setting it to SAFE doesn't appear to change anything.
In any case, we shouldn't be generating links with a non-existent anchor.