Skip to content

Commit

Permalink
fix missing colon
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Jan 17, 2025
1 parent edf2405 commit b7541b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/calendar_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(
id: SecureRandom.hex
)
@id, @icon, @summary, @description, @location, @daily =
id, icon, summary.gsub(/[^a-zA-Z0-9\.\-\"\ \_\/\\\&]/, ""), description, location, daily
id, icon, summary.gsub(/[^a-zA-Z0-9\.\-\"\ \_\/\\\&\:]/, ""), description, location, daily

@starts_at = case starts_at
when Integer
Expand Down
4 changes: 2 additions & 2 deletions test/models/calendar_event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ def test_strips_emoji
end

def test_does_not_strip_things_we_should_keep
event = CalendarEvent.new(starts_at: "2023-11-01", ends_at: "2023-11-08", summary: "foo bar / \\ ° - _ &")
event = CalendarEvent.new(starts_at: "2023-11-01", ends_at: "2023-11-08", summary: "foo bar / \\ ° - _ & :")

assert_equal("foo bar / \\ ° - _ &", event.summary)
assert_equal("foo bar / \\ ° - _ & :", event.summary)
end

def test_strips_non_ascii
Expand Down

0 comments on commit b7541b5

Please sign in to comment.