Sha256: f760bb4f59fc7c36feae703b66450dc99beddad4b28cce4b4431f0d92a1eac10
Contents?: true
Size: 670 Bytes
Versions: 12
Compression:
Stored size: 670 Bytes
Contents
class CmsPageObject < ActiveRecord::Base # attr_accessible :name, :obj_type belongs_to :page, class_name: 'CmsPage', foreign_key: 'cms_page_id' before_create :set_page_version def set_page_version if cms_page_version.to_i == 0 self.cms_page_version = page.version end end def content=(value) if value && value.is_a?(String) # filter suspicious content... go overboard for now, fine-tune later perhaps value.gsub!(/<(%.*?(exec|system)\s?\(.*?\s*%)>/, '<\1>') value.gsub!(/<(%.*?\%x\s?\[.*?\s*%)>/, '<\1>') value.gsub!(/<(%.*?`.*?\s*%)>/, '<\1>') end super(value) end end
Version data entries
12 entries across 12 versions & 1 rubygems