Skip to content

Commit

Permalink
Don't try to use "<" or ">" in Twitter card titles
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Oct 1, 2024
1 parent 04c5c23 commit 984fa0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,8 @@ func renderAtom(ctx context.Context, c *modulir.Context, atom *Atom, atomIndex i

var title string
if atom.Title == nil {
title = fmt.Sprintf("Atom <%s>", atom.Slug)
// Twitter doesn't play nicely showing "<" or ">", so don't put those in
title = "Atom " + atom.Slug
} else {
title = *atom.Title
}
Expand Down

0 comments on commit 984fa0a

Please sign in to comment.