Use more complete regexp

https://github.com/basecamp/fizzy/pull/564/files#r2119855866
This commit is contained in:
Jorge Manrubia
2025-06-02 11:43:07 +02:00
parent 5214a74c03
commit e973df97e2
+1 -1
View File
@@ -9,7 +9,7 @@ module HtmlHelper
private
EXCLUDED_ELEMENTS = %w[ a figcaption pre code ]
EMAIL_REGEXP = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/
EMAIL_REGEXP = /\b[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\b/
URL_REGEXP = URI::DEFAULT_PARSER.make_regexp(%w[http https])
def auto_link(fragment)