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

PatchPluginXmlTask wrongly escapes changeNotes tags inside CDATA block #1498

Closed
missingdays opened this issue Nov 30, 2023 · 2 comments
Closed
Milestone

Comments

@missingdays
Copy link

What happened?

PatchPluginXmlTask wrongly escapes changeNotes tags inside CDATA block, see below

Relevant log output or stack trace

No response

Steps to reproduce

Have the following task

        withType<PatchPluginXmlTask> {
            changeNotes.set(releaseNotes)
        }

where releaseNotes are

val releaseNotes = """<![CDATA[
<a href="123">123</a>
]]>"""

In the resulting plugin.xml, change-notes section will contain the html with escaped values

  <change-notes>&lt;![CDATA[
&lt;a href="123"&gt;123&lt;/a&gt;
]]&gt;</change-notes>

However, according to docs, html inside CDATA block is valid in change-notes

https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html#idea-plugin__change-notes

Gradle IntelliJ Plugin version

1.16.0

Gradle version

8.3

Operating System

Windows

Link to build, i.e. failing GitHub Action job

No response

@missingdays
Copy link
Author

Can this behavior at least be made optional?

@hsz hsz added enhancement and removed bug labels Jan 12, 2024
@hsz hsz added this to the next milestone Jan 12, 2024
hsz added a commit that referenced this issue Jan 12, 2024
…<description>` elements with `<![CDATA[ ... ]]>` #1498
@hsz
Copy link
Member

hsz commented Jan 12, 2024

Thanks for creating this ticket, Evgeny!

The content passed to <change-notes> and <description> elements is now wrapped with <![CDATA[ ... ]]> by default.

It's possible to turn that off with:

tasks {
    patchPluginXml {
        useCDATA = false
    }
}

@hsz hsz closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@hsz @missingdays and others