I'm using REST to upload wiki content to my Confluence server (v7.5.2).
'body': { 'storage': { 'representation': 'wiki', 'value': body } }
Where my data has some wiki markup, including something like this:
[ Click here | https://server/Create!init.jspa?pid=123¶m1=abc¶m2=14 ]
which Confluence then turns into:
[ Click here | https://server/Create!init.jspa?pid=123&param1=abc&param2=14 ]
Is there a way to escape the & in my source so that Confluence will keep the URL intact?
Hi @Joel Morris
Welcome to the Community!!
Wherever the Special Characters are there, you can include HTML URL Encoding Ref
https://www.w3schools.com/tags/ref_urlencode.ASP
So if you include %26 API should not return error and your URL will also work fine
Please let me know if it works for you!!
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira CreateIssueDetails!init.jspa appears to actually need the & character between the key=value pairs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, if my source data is
[ Click | https://jiraserver/secure/CreateIssueDetails!Init.jspa?pid=1234&reporter=morris ]
It uploads to Confluence as
[ Click | https://jiraserver/secure/CreateIssueDetails!Init.jspa?pid=1234&reporter=morris ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Pramodh M !
It certainly looks right in Confluence now! But the link still doesn't do what I expect in JIRA.
https://jiraserver/secure/CreateIssueDetails!init.jspa?pid=1234%26reporter=morris
Jira gives the error "You have not selected a valid project to create an issue in."
But if I change that %26 to an & in my browser's address bar, then Jira behaves correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.