dm_core 4.2.3.5 → 4.2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/dm_core/liquid_helper.rb +3 -2
- data/app/models/comment.rb +1 -0
- data/app/models/custom_field.rb +1 -0
- data/lib/dm_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac89f31f284e74d5e6aac7acb6ea93b07215272a
|
4
|
+
data.tar.gz: fda380a2a51a1799b585bcb350bc56f946d2ea7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754a71d30e5620791e1d59eb9e0c84fd745fd64fff018f7eff3e07a72749aaf5d635491cca9f62cbb92675844fa1d0ed43af47785e8d3baedbe7a4a32e263b13
|
7
|
+
data.tar.gz: 0c4121ebf9a9aaa375b58033d2ba0dd9fcc4252b31d295e4d5018629bcf4fa7877177bc306545d296c4d56279ae2bba8d366ef8954ae4953f3d03d9fe198f096
|
@@ -47,7 +47,8 @@ module DmCore::LiquidHelper
|
|
47
47
|
else
|
48
48
|
html = ::Kramdown::Document.new(content).to_html.html_safe
|
49
49
|
end
|
50
|
-
|
50
|
+
# for safety, use :basic or lower
|
51
|
+
return options[:safe] ? sanitize_text(html, level: :basic).html_safe : html
|
51
52
|
end
|
52
53
|
|
53
54
|
# Uses Sanitize gem to fully sanitize any text.
|
@@ -63,7 +64,7 @@ module DmCore::LiquidHelper
|
|
63
64
|
# Allows only very simple inline formatting markup. No links, images, or block elements.
|
64
65
|
Sanitize.clean(content, Sanitize::Config::RESTRICTED)
|
65
66
|
when :basic
|
66
|
-
#Allows a variety of markup including formatting tags, links, and lists.
|
67
|
+
# Allows a variety of markup including formatting tags, links, and lists.
|
67
68
|
# Images and tables are not allowed, links are limited to FTP, HTTP, HTTPS, and
|
68
69
|
# mailto protocols, and a rel="nofollow" attribute is added to all links to
|
69
70
|
# mitigate SEO spam.
|
data/app/models/comment.rb
CHANGED
data/app/models/custom_field.rb
CHANGED
@@ -38,6 +38,7 @@ class CustomField < ActiveRecord::Base
|
|
38
38
|
|
39
39
|
validates_presence_of :field_data, if: Proc.new {|field| field.required?}
|
40
40
|
validates_numericality_of :field_data, if: Proc.new {|field| field.field_type == 'number_field' && !field.field_data.blank?}
|
41
|
+
validates_length_of :field_data, maximum: 4096, if: Proc.new {|field| !field.field_data.blank?}
|
41
42
|
validate :checkbox_required, if: Proc.new {|field| field.field_type == 'check_box_collection' && field.required?}
|
42
43
|
|
43
44
|
#------------------------------------------------------------------------------
|
data/lib/dm_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.3.
|
4
|
+
version: 4.2.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|