diff --git a/changelog/@unreleased/pr-2234.v2.yml b/changelog/@unreleased/pr-2234.v2.yml
new file mode 100644
index 000000000..b9d37d857
--- /dev/null
+++ b/changelog/@unreleased/pr-2234.v2.yml
@@ -0,0 +1,5 @@
+type: fix
+fix:
+ description: Fix intellij gradle integration copyright configuration
+ links:
+ - https://github.com/palantir/gradle-baseline/pull/2234
diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineIdea.groovy b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineIdea.groovy
index 410df88f1..62933c5c1 100644
--- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineIdea.groovy
+++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineIdea.groovy
@@ -319,7 +319,7 @@ class BaselineIdea extends AbstractBaselinePlugin {
}
private static void createOrUpdateCopyrightFile(Node node, File file, String fileName) {
- def copyrightText = XmlUtil.escapeControlCharacters(XmlUtil.escapeXml(file.text.trim()))
+ def copyrightText = file.text.trim()
// Ensure that subsequent runs don't produce duplicate entries
Node copyrightNode = GroovyXmlUtils.matchOrCreateChild(node, "copyright")
Node noticeNode = GroovyXmlUtils.matchOrCreateChild(copyrightNode, "option", ["name": "notice"])
diff --git a/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineIdeaIntegrationTest.groovy b/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineIdeaIntegrationTest.groovy
index f562b5b28..e35c3a823 100644
--- a/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineIdeaIntegrationTest.groovy
+++ b/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineIdeaIntegrationTest.groovy
@@ -116,6 +116,8 @@ class BaselineIdeaIntegrationTest extends AbstractPluginTest {
def apacheCopyright = new File(copyrightDir, "001_apache-2.0.xml").text
apacheCopyright.contains('')
+ // Ensure correct xml encoding (not double-encoded)
+ apacheCopyright.contains('Apache License, Version 2.0 (the "License")')
def palantirCopyright = new File(copyrightDir, "999_palantir.xml").text
palantirCopyright.contains('')