diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg
index e6c7d3c..65ea9eb 100644
--- a/.github/badges/jacoco.svg
+++ b/.github/badges/jacoco.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 33f43ef..ccc68db 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -44,7 +44,7 @@ jobs:
git push
fi
- name: "Upload JaCoCo coverage report"
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: build/reports/jacoco/test/html/
diff --git a/src/main/java/io/github/pixee/security/Newlines.java b/src/main/java/io/github/pixee/security/Newlines.java
index 76d6449..ce36692 100644
--- a/src/main/java/io/github/pixee/security/Newlines.java
+++ b/src/main/java/io/github/pixee/security/Newlines.java
@@ -17,4 +17,14 @@ public static String stripAll(final String value) {
}
return value.replace("\r", "").replace("\n", "");
}
+
+ /**
+ * Removes newlines from the given string, if any exist.
+ *
+ * @param value the given string to sanitize
+ * @return a {@link String} identical to the one given, without newline characters
+ */
+ public static String stripAll(final Object value) {
+ return stripAll(String.valueOf(value));
+ }
}