Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Prevent < and > in commit titles from breaking dag-sync slack message (#2837)

Madison Swain-Bowdenfae7f80dc11c
diff --git a/dag-sync.sh b/dag-sync.sh
index 165c7cb29..240034193 100755
--- a/dag-sync.sh
+++ b/dag-sync.sh
@@ -30,6 +30,10 @@ have_dag=$(git log -p -1 "$new" --pretty=format: --name-only | grep "catalog/dag
# Pull out the subject from the new commit
subject=$(git log -1 --format='%s')
+# Swap the < & > characters for their HTML entities so they aren't
+# interpreted as delimiters by Slack
+subject=${subject//>/&gt;}
+subject=${subject//</&lt;}
if [ -z "$SLACK_URL" ]; then
echo "Slack hook was not supplied! Updates will not be posted"