More html escaping in factories
This commit is contained in:
parent
ad0a8eecf2
commit
c4e0a5312e
7 changed files with 8 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :conference do
|
factory :conference do
|
||||||
title { Faker::Book.title }
|
title { CGI.escapeHTML(Faker::Book.title) }
|
||||||
short_title { SecureRandom.urlsafe_base64(4) }
|
short_title { SecureRandom.urlsafe_base64(4) }
|
||||||
timezone { Faker::Address.time_zone }
|
timezone { Faker::Address.time_zone }
|
||||||
start_date { Date.today }
|
start_date { Date.today }
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :event do
|
factory :event do
|
||||||
title { Faker::Hipster.sentence }
|
title { CGI.escapeHTML(Faker::Hipster.sentence) }
|
||||||
abstract { Faker::Hipster.paragraph(2) }
|
abstract { CGI.escapeHTML(Faker::Hipster.paragraph(2)) }
|
||||||
|
|
||||||
program
|
program
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :sponsor do
|
factory :sponsor do
|
||||||
name { Faker::Company.name }
|
name { CGI.escapeHTML(Faker::Company.name) }
|
||||||
website_url { Faker::Internet.url }
|
website_url { Faker::Internet.url }
|
||||||
description { CGI.escapeHTML(Faker::Lorem.paragraph) }
|
description { CGI.escapeHTML(Faker::Lorem.paragraph) }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :sponsorship_level do
|
factory :sponsorship_level do
|
||||||
title { Faker::Hipster.word }
|
title { Faker::Lorem.word }
|
||||||
|
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :ticket do
|
factory :ticket do
|
||||||
title { "#{Faker::Hipster.word} Ticket" }
|
title { CGI.escapeHTML("#{Faker::Hipster.word} Ticket") }
|
||||||
price_cents 1000
|
price_cents 1000
|
||||||
price_currency 'USD'
|
price_currency 'USD'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :track do
|
factory :track do
|
||||||
name { Faker::Commerce.department(2, true) }
|
name { CGI.escapeHTML(Faker::Commerce.department(2, true)) }
|
||||||
description { Faker::Lorem.sentence }
|
description { Faker::Lorem.sentence }
|
||||||
color { Faker::Color.hex_color }
|
color { Faker::Color.hex_color }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :venue do
|
factory :venue do
|
||||||
name { "#{Faker::Company.name} Office" }
|
name { CGI.escapeHTML("#{Faker::Company.name} Office") }
|
||||||
street { Faker::Address.street_address }
|
street { Faker::Address.street_address }
|
||||||
city { Faker::Address.city }
|
city { Faker::Address.city }
|
||||||
postalcode { Faker::Address.postcode }
|
postalcode { Faker::Address.postcode }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue