Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364210 - Confluence rendering of link tag is broken (e.g. [http://google.com|http://yahoo.com])
Summary: Confluence rendering of link tag is broken (e.g. [http://google.com|http://ya...
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-19 02:16 EST by Mark CLA
Modified: 2013-08-02 12:42 EDT (History)
0 users

See Also:


Attachments
mylyn/context/zip (19.65 KB, application/octet-stream)
2011-11-21 17:49 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.