]> git.openstreetmap.org Git - rails.git/commitdiff
Use character validate to exclude URL characters for trace tags
authorTom Hughes <tom@compton.nu>
Mon, 5 Nov 2018 19:07:26 +0000 (19:07 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 5 Nov 2018 21:16:21 +0000 (21:16 +0000)
app/models/tracetag.rb

index 75fcb48b7e78b587829397bd7225206af4e7bf4b..84b6c6dfa8394404c3757a20145e1a77a6791c82 100644 (file)
@@ -22,5 +22,5 @@ class Tracetag < ActiveRecord::Base
   belongs_to :trace, :foreign_key => "gpx_id"
 
   validates :trace, :associated => true
-  validates :tag, :length => 1..255, :format => %r{\A[^/;.,?]*\z}, :characters => true
+  validates :tag, :length => 1..255, :characters => { :url_safe => true }
 end