Details
Description
The HTML markup returned by the two renderContent methods contains relative URLs for images, links, etc. For example, a "user mention" link is rendered as follows:
<a class="confluence-userlink user-mention" data-username="admin" href="/display/~admin" data-linked-resource-id="524289" data-linked-resource-type="userinfo" data-base-url="http://my-confluence-host:8090">Joe Bloggs</a>
This is not terribly useful when the caller is not the target Confluence instance. For example, a JIRA plugin obtaining this content would attempt to resolve the above href URL (i.e. /display/~admin) within its own hostname and servlet context.
There is a workaround that involves prefixing the above href with the above data-base-url, but this is fairly ugly, as it involves scanning and modifying the entire rendered content, noting that URLs can appear in many places and may already be absolute in some cases.
Attachments
Issue Links
- mentioned in
-
Wiki Page Loading...