#300: Prevents " characters in action descriptions

This commit is contained in:
Henrik Bohre 2009-08-21 15:21:16 +02:00 committed by Eric Allen
parent 85127c8b11
commit 358f1abba2

View file

@ -121,6 +121,7 @@ class Todo < ActiveRecord::Base
if !show_from.blank? && show_from < user.date
errors.add("show_from", "must be a date in the future")
end
errors.add(:description, "may not contain \" characters") if /\"/.match(description)
unless @predecessor_array.nil? # Only validate predecessors if they changed
@predecessor_array.each do |specification|
t = todo_from_specification(specification)