vendor/assets/javascripts/parser_rules/advanced.js in wysihtml5x-rails-0.4.17 vs vendor/assets/javascripts/parser_rules/advanced.js in wysihtml5x-rails-0.5.0.beta1

- old
+ new

@@ -104,11 +104,12 @@ * - check_attributes: checks the given HTML attribute via the given method * - url: allows only valid urls (starting with http:// or https://) * - src: allows something like "/foobar.jpg", "http://google.com", ... * - href: allows something like "mailto:bert@foo.com", "http://google.com", "/foobar.jpg" * - alt: strips unwanted characters. if the attribute is not set, then it gets set (to ensure valid and compatible HTML) - * - numbers: ensures that the attribute only contains numeric characters + * - numbers: ensures that the attribute only contains numeric (integer) characters (no float values or units) + * - dimension: for with/height attributes where floating point numbrs and percentages are allowed * - any: allows anything to pass */ "tags": { "tr": { "add_class": { @@ -195,13 +196,13 @@ "rel": "nofollow" } }, "img": { "check_attributes": { - "width": "numbers", + "width": "dimension", "alt": "alt", "src": "url", // if you compiled master manually then change this from 'url' to 'src' - "height": "numbers" + "height": "dimension" }, "add_class": { "align": "align_img" } },