Skip to content

Commit 96c3628

Browse files
committed
support more chars
1 parent b7541b5 commit 96c3628

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/models/calendar_event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def initialize(
1515
id: SecureRandom.hex
1616
)
1717
@id, @icon, @summary, @description, @location, @daily =
18-
id, icon, summary.gsub(/[^a-zA-Z0-9\.\-\"\ \_\/\\\&\:]/, ""), description, location, daily
18+
id, icon, summary.gsub(/[^a-zA-Z0-9\.\-\"\ \_\/\\\&\:\+\,\?]/, ""), description, location, daily
1919

2020
@starts_at = case starts_at
2121
when Integer

test/models/calendar_event_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def test_strips_emoji
195195
end
196196

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

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

203203
def test_strips_non_ascii

0 commit comments

Comments
 (0)