diff --git a/app/models/article.rb b/app/models/article.rb index d805f172b..733293735 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -83,6 +83,7 @@ class Article < ApplicationRecord \u303d # Either a line chart plummeting or the letter M, not sure \u3297 # Circled Ideograph Congratulation \u3299 # Circled Ideograph Secret + \u20ac # Euro symbol (€) \u{1f000}-\u{1ffff} # More common emoji ]+/m # rubocop:enable Lint/DuplicateRegexpCharacterClassElement diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index 13e1c3299..f5a9db75c 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -237,6 +237,14 @@ RSpec.describe Article, type: :model do expect(article.title).to eq allowed_title end + it "allows Euro symbol (€)" do + allowed_title = "Euro code €€€" + + article = create(:article, title: allowed_title) + + expect(article.title).to eq allowed_title + end + it "produces a proper title" do test_article = build(:article, title: "An Article Title")