Skip to content

Commit 4e602ca

Browse files
author
Oliver Pulges
committed
Update to v0.5.0.beta1
1 parent bebe568 commit 4e602ca

File tree

4 files changed

+1870
-785
lines changed

4 files changed

+1870
-785
lines changed

vendor/assets/javascripts/parser_rules/advanced.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ var wysihtml5ParserRules = {
106106
* - src: allows something like "/foobar.jpg", "http://google.com", ...
107107
* - href: allows something like "mailto:[email protected]", "http://google.com", "/foobar.jpg"
108108
* - alt: strips unwanted characters. if the attribute is not set, then it gets set (to ensure valid and compatible HTML)
109-
* - numbers: ensures that the attribute only contains numeric characters
109+
* - numbers: ensures that the attribute only contains numeric (integer) characters (no float values or units)
110+
* - dimension: for with/height attributes where floating point numbrs and percentages are allowed
110111
* - any: allows anything to pass
111112
*/
112113
"tags": {
@@ -197,10 +198,10 @@ var wysihtml5ParserRules = {
197198
},
198199
"img": {
199200
"check_attributes": {
200-
"width": "numbers",
201+
"width": "dimension",
201202
"alt": "alt",
202203
"src": "url", // if you compiled master manually then change this from 'url' to 'src'
203-
"height": "numbers"
204+
"height": "dimension"
204205
},
205206
"add_class": {
206207
"align": "align_img"

vendor/assets/javascripts/parser_rules/advanced_unwrap.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ var wysihtml5ParserRules = {
184184
* - src: allows something like "/foobar.jpg", "http://google.com", ...
185185
* - href: allows something like "mailto:[email protected]", "http://google.com", "/foobar.jpg"
186186
* - alt: strips unwanted characters. if the attribute is not set, then it gets set (to ensure valid and compatible HTML)
187-
* - numbers: ensures that the attribute only contains numeric characters
187+
* - numbers: ensures that the attribute only contains numeric (integer) characters (no float values or units)
188+
* - dimension: for with/height attributes where floating point numbrs and percentages are allowed
188189
* - any: allows anything to pass
189190
*/
190191
"tags": {
@@ -278,10 +279,10 @@ var wysihtml5ParserRules = {
278279
"valid_image_src": 1
279280
},
280281
"check_attributes": {
281-
"width": "numbers",
282+
"width": "dimension",
282283
"alt": "alt",
283284
"src": "src", // if you compiled master manually then change this from 'url' to 'src'
284-
"height": "numbers"
285+
"height": "dimension"
285286
},
286287
"add_class": {
287288
"align": "align_img"

0 commit comments

Comments
 (0)