morrigan_editor_rails 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2a0eae8ce38cd5c8817d7dc24e7a7c2f5102129
4
- data.tar.gz: 51faa99b399fc16eefdedb68f817aeae839f3f6f
3
+ metadata.gz: ac8edc84f22e2398184ec37ed538797316e03201
4
+ data.tar.gz: 3007dabc21d7e903903d09a2af1f3ac3aea46265
5
5
  SHA512:
6
- metadata.gz: eb6e832d2dce3460c53bc2792a02c630e02a03216d164afae98db6330b2ccd93b495b4eb904da325fa4946428010798f84e70398308e9b8023fe7ed9b29e87c2
7
- data.tar.gz: a9e54a095936f52169fba97d1e5019845483ad7f76a6df39d57cc5a89ff10f9e439f5ccd15fbe460178976ae63ede024022a31c0e07a80107482d6e88d747286
6
+ metadata.gz: 6bd2f03e4fd570c2f48ea5d6dff607d366cbe1c37e234fad8dd0ba4b107b1c7b2606b64992cb216e3072a338a7d103e8cc45208090bfda6998be83f3ed3c84b7
7
+ data.tar.gz: 28bf333746a840f3c102580b2222b02fde1b92cae28fa6c80a47a646d83d927857b8603e56089383a8b24f7196b1ed6d0924e2d6792f7cb50c42afc1160e826f
@@ -1,3 +1,3 @@
1
1
  module MorriganEditorRails
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -18,24 +18,19 @@ module MorriganEditorRails
18
18
  end
19
19
 
20
20
  def self.sanitize_config
21
- {
22
- :elements => WHITELIST_ELEMENTS,
21
+ relaxed_conf = Sanitize::Config::RELAXED
22
+ relaxed_conf.merge({
23
+ elements: (WHITELIST_ELEMENTS + relaxed_conf[:elements]).uniq,
23
24
 
24
- :attributes => {
25
- 'a' => ['href'],
26
- 'p' => ['style'],
27
- 'img' => ['src', 'style'],
28
- 'iframe' => ['width', 'height', 'src', 'frameborder', 'allowfullscreen', 'wmode', 'style'],
29
- 'div' => ['style', 'contenteditable', 'class'],
30
- 'h2' => ['style'],
31
- 'h3' => ['style'],
32
- 'h4' => ['style']
33
- },
25
+ attributes: merge(relaxed_conf[:attributes],
26
+ 'iframe' => ['width', 'height', 'src', 'frameborder', 'allowfullscreen', 'wmode', 'style'],
27
+ 'div' => ['contenteditable', 'class']
28
+ ),
34
29
 
35
- :protocols => {
36
- 'a' => {'href' => ['http', 'https', 'mailto', 'ftp']}
37
- }
38
- }
30
+ protocols: merge(relaxed_conf[:protocols],
31
+ 'a' => {'href' => ['http', 'https', 'mailto', 'ftp']}
32
+ )
33
+ })
39
34
  end
40
35
 
41
36
  def self.preview_sanitize_config
@@ -1,5 +1,6 @@
1
1
  <!--<%= asset_path('morrigan_editor_rails/iframe.css') %>-->
2
2
  <%= MorriganEditorRails::Editor.preview_sanitize '<h2>asd</h2><p><b><a href="http://foo.com/">foo</a></b><img src="bar.jpg">' %>
3
+ <%= MorriganEditorRails::Editor.sanitize '<h2>asd</h2><p><b><a href="http://foo.com/">foo</a></b><img src="bar.jpg">' %>
3
4
  <form id="form">
4
5
  <div class="has-error"><textarea id="textarea"><p>ads</p><p>fgh</p></textarea></div>
5
6
  <div morrigan-editor="true" id="editor" editor-width="100%" editor-height="300px" editor-bound-textarea="#textarea"></div>
@@ -11969,3 +11969,243 @@ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-07-28 15:42:19 +04
11969
11969
 
11970
11970
 
11971
11971
  Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-07-28 15:42:19 +0400
11972
+
11973
+
11974
+ Started GET "/" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11975
+ Processing by TestController#index as HTML
11976
+ Rendered test/index.html.erb within layouts/application (0.9ms)
11977
+ Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)
11978
+
11979
+
11980
+ Started GET "/assets/editor_iframe.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11981
+
11982
+
11983
+ Started GET "/assets/morrigan_editor_rails/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11984
+
11985
+
11986
+ Started GET "/assets/font-awesome.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11987
+
11988
+
11989
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11990
+
11991
+
11992
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11993
+
11994
+
11995
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11996
+
11997
+
11998
+ Started GET "/assets/jquery-ui/core.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
11999
+
12000
+
12001
+ Started GET "/assets/jquery-ui/widget.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12002
+
12003
+
12004
+ Started GET "/assets/morrigan_editor_rails/main.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12005
+
12006
+
12007
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12008
+
12009
+
12010
+ Started GET "/assets/morrigan_editor_rails/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12011
+
12012
+
12013
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12014
+
12015
+
12016
+ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12017
+
12018
+
12019
+ Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-08-18 12:48:12 +0400
12020
+
12021
+
12022
+ Started GET "/" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12023
+ Processing by TestController#index as HTML
12024
+ Rendered test/index.html.erb within layouts/application (1.8ms)
12025
+ Completed 200 OK in 12ms (Views: 12.0ms | ActiveRecord: 0.0ms)
12026
+
12027
+
12028
+ Started GET "/assets/editor_iframe.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12029
+
12030
+
12031
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12032
+
12033
+
12034
+ Started GET "/assets/font-awesome.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12035
+
12036
+
12037
+ Started GET "/assets/morrigan_editor_rails/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12038
+
12039
+
12040
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12041
+
12042
+
12043
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12044
+
12045
+
12046
+ Started GET "/assets/jquery-ui/core.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12047
+
12048
+
12049
+ Started GET "/assets/jquery-ui/widget.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12050
+
12051
+
12052
+ Started GET "/assets/morrigan_editor_rails/main.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12053
+
12054
+
12055
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12056
+
12057
+
12058
+ Started GET "/assets/morrigan_editor_rails/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12059
+
12060
+
12061
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:16 +0400
12062
+
12063
+
12064
+ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-08-18 12:48:17 +0400
12065
+
12066
+
12067
+ Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-08-18 12:48:17 +0400
12068
+
12069
+
12070
+ Started GET "/" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12071
+ Processing by TestController#index as HTML
12072
+ Rendered test/index.html.erb within layouts/application (2.1ms)
12073
+ Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.0ms)
12074
+
12075
+
12076
+ Started GET "/assets/editor_iframe.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12077
+
12078
+
12079
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12080
+
12081
+
12082
+ Started GET "/assets/font-awesome.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12083
+
12084
+
12085
+ Started GET "/assets/morrigan_editor_rails/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12086
+
12087
+
12088
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12089
+
12090
+
12091
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12092
+
12093
+
12094
+ Started GET "/assets/morrigan_editor_rails/main.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12095
+
12096
+
12097
+ Started GET "/assets/jquery-ui/widget.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12098
+
12099
+
12100
+ Started GET "/assets/morrigan_editor_rails/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12101
+
12102
+
12103
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12104
+
12105
+
12106
+ Started GET "/assets/jquery-ui/core.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12107
+
12108
+
12109
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12110
+
12111
+
12112
+ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12113
+
12114
+
12115
+ Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-08-18 12:48:50 +0400
12116
+
12117
+
12118
+ Started GET "/" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12119
+ Processing by TestController#index as HTML
12120
+ Rendered test/index.html.erb within layouts/application (1.5ms)
12121
+ Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
12122
+
12123
+
12124
+ Started GET "/assets/editor_iframe.css?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12125
+
12126
+
12127
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.css?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12128
+
12129
+
12130
+ Started GET "/assets/font-awesome.css?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12131
+
12132
+
12133
+ Started GET "/assets/morrigan_editor_rails/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12134
+
12135
+
12136
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12137
+
12138
+
12139
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12140
+
12141
+
12142
+ Started GET "/assets/jquery-ui/widget.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12143
+
12144
+
12145
+ Started GET "/assets/jquery-ui/core.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12146
+
12147
+
12148
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12149
+
12150
+
12151
+ Started GET "/assets/morrigan_editor_rails/main.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12152
+
12153
+
12154
+ Started GET "/assets/morrigan_editor_rails/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12155
+
12156
+
12157
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12158
+
12159
+
12160
+ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12161
+
12162
+
12163
+ Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-08-18 12:49:01 +0400
12164
+
12165
+
12166
+ Started GET "/" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12167
+ Processing by TestController#index as HTML
12168
+ Rendered test/index.html.erb within layouts/application (1.4ms)
12169
+ Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
12170
+
12171
+
12172
+ Started GET "/assets/editor_iframe.css?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12173
+
12174
+
12175
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.css?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12176
+
12177
+
12178
+ Started GET "/assets/font-awesome.css?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12179
+
12180
+
12181
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12182
+
12183
+
12184
+ Started GET "/assets/morrigan_editor_rails/application.css?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12185
+
12186
+
12187
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12188
+
12189
+
12190
+ Started GET "/assets/jquery-ui/core.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12191
+
12192
+
12193
+ Started GET "/assets/jquery-ui/widget.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12194
+
12195
+
12196
+ Started GET "/assets/morrigan_editor_rails/main.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12197
+
12198
+
12199
+ Started GET "/assets/morrigan_editor_rails/morrigan-jquery-editor.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12200
+
12201
+
12202
+ Started GET "/assets/morrigan_editor_rails/application.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12203
+
12204
+
12205
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12206
+
12207
+
12208
+ Started GET "/assets/editor_iframe.css" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
12209
+
12210
+
12211
+ Started GET "/assets/fontawesome-webfont.woff" for 127.0.0.1 at 2014-08-18 13:16:44 +0400
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morrigan_editor_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Sokolov