Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails with error if markdown page has img HTML tag with URL that contains multiple query parameters #486

Open
fabasoad opened this issue Aug 14, 2024 · 0 comments
Labels

Comments

@fabasoad
Copy link

What happened?

I am trying to sync Markdown file into Confluence page with a few <img src="https://<url>?param1=test&param2=test" /> HTML tags but CLI fails with the following error:

2024-08-14 16:29:52.761 FATAL Confluence API returned unexpected status: 400 Bad Request, output: ""

What did you expect to happen?

I would expect mark CLI to sync that page correctly by escaping & in query parameters automatically.

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Have the following HTML tag in your Markdown file:
<img alt="Test" src="https://img.shields.io/badge/Test-blue.svg?logo=github&logoColor=white&color=gray" />
  1. Sync it with the following command:
mark -p "$token" -b "$url" -f "$file"

Further Information (please complete the following information)

  • Mark Version (mark --version): 10.0.1
  • Mark Parameters: -p "$token" -b "$url" -f "$file"
  • Confluence Hosting: Server
  • Confluence Version: 8.5.11
  • Environment specific Information: macOS

Logs or other output

2024-08-14 16:29:52.422 INFO  processing <path>/README.md
2024-08-14 16:29:52.679 INFO  page will be stored under path: <Confluence path>
2024-08-14 16:29:52.761 FATAL Confluence API returned unexpected status: 400 Bad Request, output: ""

Additional context

The problem is in escaping &. I did some testing and this works for me: <img src="https://<url>?param1=test&amp;param2=test" />.

@fabasoad fabasoad added the bug label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant