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

OpenProject status formatting broken #38

Closed
suntorytimed opened this issue Jul 7, 2023 · 2 comments
Closed

OpenProject status formatting broken #38

suntorytimed opened this issue Jul 7, 2023 · 2 comments

Comments

@suntorytimed
Copy link
Contributor

The detailed view of the OpenProject bug seems to be broken. I think it is managed in this part of the code: https://github.com/kiwitcms/trackers-integration/blob/c64ab3cee5d1a67744d2b93c4b4e14fe6a12601c/trackers_integration/issuetracker/openproject.py#L194C1-L204C10

The UI is showing this:
Details_OpenProject_Bug

@suntorytimed
Copy link
Contributor Author

suntorytimed commented Jul 7, 2023

It looks like the HTML isn't rendered correctly. Maybe there is some kind of string conversion or some escaping done? when looking at the HTML content it is actually content in that box that renders as HTML code instead of the HTML code that should be rendered.

Maybe html.unescape("description": issue["description"]["html"]), in https://github.com/kiwitcms/trackers-integration/blob/c64ab3cee5d1a67744d2b93c4b4e14fe6a12601c/trackers_integration/issuetracker/openproject.py#L203C16-L203C16 would resolve this?

@suntorytimed
Copy link
Contributor Author

Escaping and unescaping didn't work. Maybe it's the renderer in Kiwi itself, that is messing with the HTML content provided by the implementation.

atodorov added a commit that referenced this issue Nov 9, 2023
Closes #38.

Note1: OpenProject supports markdown by default and the raw text will
include markdown formatting characters. This looks slightly less
aggravating than displaying the HTML code.

Note2: Input from the outside world is always considered unsafe and RPC
results are always HTML escaped due to security considerations. This
will always look not-right even if we render back to plain text!
atodorov added a commit that referenced this issue Nov 9, 2023
Closes #38.

Note1: OpenProject supports markdown by default and the raw text will
include markdown formatting characters. This looks slightly less
aggravating than displaying the HTML code.

Note2: Input from the outside world is always considered unsafe and RPC
results are always HTML escaped due to security considerations. This
will always look not-right even if we render back to plain text!
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

1 participant