From 358f1abba2d2015b0d20cc8dcb75add776f87313 Mon Sep 17 00:00:00 2001 From: Henrik Bohre Date: Fri, 21 Aug 2009 15:21:16 +0200 Subject: [PATCH] #300: Prevents " characters in action descriptions --- app/models/todo.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/todo.rb b/app/models/todo.rb index 4fec3a33..8785ebee 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -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)