confluencebuilder icon indicating copy to clipboard operation
confluencebuilder copied to clipboard

ampersand in url not properly handled

Open updiversity opened this issue 3 years ago • 1 comments

Hi,

i am currently using sphinxcontrib-confluencebuilder v 1.8.0

with this md file

# my bug file

[![Gitlab](https://img.shields.io/badge/gitlab-black?style=for-the-badge&logo=gitlab)](https://about.gitlab.com/) 

and when i try to publish it, i got the following error

sphinxcontrib.confluencebuilder error:

---
Unsupported Confluence API call

An unsupported Confluence API call has been made. See the following
details for more information:

REQ: POST
RSP: 400
URL: https://myconfluence.atlassian.net/wiki/rest/api
API: content
DATA: {
  "statusCode": 400,
  "data": {
    "authorized": false,
    "valid": true,
    "errors": [],
    "successful": false
  },
  "message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Error parsing xhtml: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'logo'\n at [row,col {unknown-source}]: [2,85]"
}
---

after analysis, it looks like that the raw confluence file (.conf) being generating, does not like the ampersand in the url.

On the other side, the markdown file is successfully interpreted in github or gitlab.

updiversity avatar May 09 '22 16:05 updiversity

Thanks for the report.

Changes have been added in #644 to correct the issue where URIs were not properly encoded, causing a publication event to fail. This change has been added into the main branch and should be made available next stable release. If blocked by this issue before a release is made, the development version of this extension can be installed.

If this does not resolve your issue, please let me know.

jdknight avatar May 12 '22 01:05 jdknight

v1.9 is now available on PyPI -- marking as closed.

jdknight avatar Aug 21 '22 18:08 jdknight