Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364210

Summary: Confluence rendering of link tag is broken (e.g. [http://google.com|http://yahoo.com])
Product: z_Archived Reporter: Mark <markwoon+eclipse>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: RESOLVED WONTFIX QA Contact: David Green <greensopinion>
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Mark CLA 2011-11-19 02:16:30 EST
Build Identifier: NA

Running this:

    MarkupParser markupParser = new MarkupParser(new ConfluenceLanguage());
    StringWriter writer = new StringWriter();
    HtmlDocumentBuilder builder = new HtmlDocumentBuilder(writer);
    // avoid the <html> and <body> tags
    builder.setEmitAsDocument(false);
    markupParser.setBuilder(builder);
    markupParser.parse("[http://google.com|http://yahoo.com]");
    System.out.println(writer.toString());

Produces:

<p><a href="http://yahoo.com"><a href="http://google.com">http://google.com</a></a></p>

Instead, it should render:

<p><a href="http://yahoo.com">http://google.com</a></p>


Reproducible: Always
Comment 1 Mark CLA 2011-11-19 02:17:43 EST
Forgot to mention that this is with standalone wikitext version 1.6.
Comment 2 David Green CLA 2011-11-21 17:49:21 EST
Thanks for the bug.  The workaround is to avoid hyperlinks in Confluence hyperlink labels.  In this example, try @[google.com|http://yahoo.com]@ (don't include "http://" in the hyperlink label)
Comment 3 David Green CLA 2011-11-21 17:49:42 EST
Created attachment 207339 [details]
mylyn/context/zip
Comment 4 David Green CLA 2013-08-02 12:42:07 EDT
Closed as part of backlog clean-up.  Please re-open if you'd like to see this revisited, perhaps with a contribution.