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

publishToConfluence task erroneously replaces HTML special characters in code blocks #1377

Closed
houserockr opened this issue Feb 29, 2024 · 6 comments

Comments

@houserockr
Copy link

houserockr commented Feb 29, 2024

Problem description

Whenever we use the publishToConfluence task to upload our document to our self-hosted confluence instance, special HTML characters within (C++) code blocks are replaced where they shouldn't be replaced.

Example code block in markdown:

.Example
[source, cpp]
----
vector<string> read_until(const string& terminator)
{
    vector<string> res;
    for (string s; cin >> s && s != terminator; ) // read a word
        res.push_back(s);
    return res;
}
----

And here's a screenshot of the rendered result in confluence:

Screenshot 2024-02-29 at 16 46 34

Is this a bug or is there any other way to tell the publishToConfluence task not to convert HTML special chars within code blocks?

Note: The HTML generated by the generateHTML task does not have this problem.

Environment

  • Confluence 8.5.6 self-hosted
  • Doctoolchain 3.2.2 local
  • OS: MacOS 14.3.1
@PacoVK
Copy link
Collaborator

PacoVK commented Feb 29, 2024

@houserockr tganks for reporting. just to put it into context, did you use a docToolchain version like 2.x and it worked or did you just start working with docToolchain. That would help to find a starting point for the bug you discovered ☺️✌️

@houserockr
Copy link
Author

@PacoVK thank you for getting back to me!
We've been using doctoolchain for 4 years, but only the generatePDF and generateHTML tasks.
Recently, we introduced confluence so we thought we'd give the publishToConfluence task a try.
So we don't have any positive or negative history with that unfortunately.

@PacoVK
Copy link
Collaborator

PacoVK commented Mar 1, 2024

no worries :) i also did not recognize that you tried v3.2.2. The issue you see is related to #1349 which was fixed in v3.3 (i could also verify that)
grafik

I will try to create another release soon, because unfortunately there was also some issues in v3.3. Stay tuned, i will let you know asap as the new release is there :)

@PacoVK
Copy link
Collaborator

PacoVK commented Mar 1, 2024

Here it is @houserockr please give 3.3.1 a try and let me know if that solves your issue 🏥

@houserockr
Copy link
Author

@PacoVK wow that was quick. Thank you very much. I will try it with 3.3.1 monday ... 🙏

@houserockr
Copy link
Author

Works with 3.3.1
Screenshot 2024-03-05 at 12 38 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants