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

Build failing with error: malformed HTML #1408

Closed
iwahbe opened this issue Aug 9, 2024 · 1 comment · Fixed by #1409
Closed

Build failing with error: malformed HTML #1408

iwahbe opened this issue Aug 9, 2024 · 1 comment · Fixed by #1409
Assignees
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer
Milestone

Comments

@iwahbe
Copy link
Member

iwahbe commented Aug 9, 2024

What happened?

/home/runner/work/pulumi-docker/pulumi-docker/sdk/java/src/main/java/com/pulumi/docker/Image.java:290: error: malformed HTML
     * The manifest digest of an image pushed to a registry, of the format repository{@literal @}<algorithm&gt;:&lt;hash&gt;, e.g. `username/demo-image{@literal @}sha256:a6ae6dd8d39c5bb02320e41abf00cd4cb35905fec540e37d306c878be8d38bd3`.
                                                                                                 ^

Example

This was discovered when testing pulumi-terraform-bridge v3.89.0-candidate on docker:

https://github.com/pulumi/pulumi-docker/actions/runs/10307662375/job/28533381889

I have confirmed that this issue is not present on 0.12.0.

Output of pulumi about

NA

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@iwahbe iwahbe added impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 9, 2024
@justinvp justinvp added p1 A bug severe enough to be the next item assigned to an engineer and removed needs-triage Needs attention from the triage team labels Aug 9, 2024
@justinvp justinvp added this to the 0.109 milestone Aug 9, 2024
@justinvp
Copy link
Member

justinvp commented Aug 9, 2024

@lunaris, possibly due to #1397?

lunaris added a commit that referenced this issue Aug 13, 2024
When formatting Javadocs, we use a state machine to track what we should be
escaping and when. In the case of non-code blocks, we generally HTML-escape all
characters except `@`, which must be encoded using a Javadoc `{@literal @}`
block. If we see a sequence of `@` characters, we enter a state where we try to
print as many `@`s as possible before closing the `@literal` block.
Unfortunately, there is a bug whereby when closing the literal block (because we
have seen a non-`@` character), we do not HTML-escape the first character after
it. This commit fixes this issue.

Fixes #1408
lunaris added a commit that referenced this issue Aug 13, 2024
When formatting Javadocs, we use a state machine to track what we should be
escaping and when. In the case of non-code blocks, we generally HTML-escape all
characters except `@`, which must be encoded using a Javadoc `{@literal @}`
block. If we see a sequence of `@` characters, we enter a state where we try to
print as many `@`s as possible before closing the `@literal` block.
Unfortunately, there is a bug whereby when closing the literal block (because we
have seen a non-`@` character), we do not HTML-escape the first character after
it. This commit fixes this issue.

Fixes #1408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants