Opened 13 years ago
Closed 12 years ago
#10202 closed New Feature (fixed)
Introduce string based validators with wildcards
| Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.4.0 |
| Component: | General | Version: | 4.1 |
| Keywords: | Drupal | Cc: | wim.leers@… |
Description
Extracted from #10191. That patch removes support for function and regexp based validators, so we can introduce wildcards support for string based ones.
E.g.: attributes: 'data-*'
Change History (14)
comment:1 Changed 13 years ago by
| Status: | new → confirmed |
|---|
comment:2 Changed 13 years ago by
| Milestone: | → CKEditor 4.2 |
|---|
comment:3 Changed 13 years ago by
| Owner: | set to Olek Nowodziński |
|---|---|
| Status: | confirmed → assigned |
comment:4 Changed 13 years ago by
| Status: | assigned → review |
|---|
Created branch t/10202 + tests.
Introduced:
- Wildcards in string format:
span[data-*](class*)
- Regex in object format:
'h*': true, a: { attributes: [ 'href(lang)?$', 'rel' ], classes: [ 'class[^\\d]?(?!.*moo$)' ] }, '$1': { elements: 's(ub|up)' }
comment:5 Changed 13 years ago by
| Cc: | wim.leers@… added |
|---|---|
| Keywords: | Drupal added |
Needed in Drupal: http://drupal.org/node/1936392#comment-7233668.
comment:6 Changed 13 years ago by
| Status: | review → review_failed |
|---|
I pushed both branches. Dev is rebased on major, tests rebased and one commit is added.
As failing tests prove:
- Required attributes do not work when used with wildcard. It may be unclear how
span[!data-*]should work, but I think that the rule is simple - at least one data-* attribute is required. Making this work will require changes to thehasAllRequiredfuntion. - The
*character in object format should not be replaced with.*as it is done for string format. Thus, that replacement has to be done earlier - when we still know that string format was an input - perhaps during rule normalization. This implies that only the regexp format will land infilter.allowedContent. So more tests for rules normalization have to be added.
Note: I reviewed only filter/filter tests - the rest may require update too.
comment:7 Changed 13 years ago by
Workaround for this missing feature was described here: http://dev.ckeditor.com/ticket/10471#comment:1
comment:8 Changed 12 years ago by
| Milestone: | CKEditor 4.2 → CKEditor 4.3 |
|---|
comment:9 Changed 12 years ago by
| Milestone: | CKEditor 4.3 Beta |
|---|
We need feedback on this to understand if this is still critical and therefore eventually target it to the 4.3.
comment:10 Changed 12 years ago by
| Milestone: | → CKEditor 4.4 |
|---|
comment:11 Changed 12 years ago by
| Owner: | changed from Olek Nowodziński to Piotrek Koszuliński |
|---|---|
| Status: | review_failed → assigned |
comment:12 Changed 12 years ago by
| Status: | assigned → review |
|---|
Pushed branch:t/10202b on dev and tests.
comment:13 Changed 12 years ago by
| Status: | review → review_passed |
|---|
comment:14 Changed 12 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Fixed on major with git:6563276 on dev and 74d2a6b on tests.

Required by #9764.