Opened 12 years ago
Closed 12 years ago
#10191 closed Task (fixed)
Always extract styles/classes/attrs required by ACRs before creating filter.allowedContent array to unify its format
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.1 |
Component: | General | Version: | 4.1 RC |
Keywords: | Drupal | Cc: | wim.leers@… |
Description
Now:
- some ACRs available in filter.allowedContent array have styles/classes/attrs required by them only marked with "!" characters.
- some have their required styles/classes/attrs copied to requiredClasses/Styles/Attributes arrays.
We should always expose the second format.
Change History (7)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
Milestone: | → CKEditor 4.1 |
---|
comment:3 Changed 12 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 12 years ago by
Cc: | wim.leers@… added |
---|---|
Keywords: | Drupal added |
comment:5 Changed 12 years ago by
Status: | assigned → review |
---|
Pushed t/10191 on dev and tests.
I thought that this patch will be pretty simple, but it isn't :)
- All added rules are now pushed to
filter.allowedContent
in standardized format. All kinds of elements/styles/classes/attrs validators are transformed to objects like:
{ foo: true, bar: true
}.
I chose objects rather than arrays because in the future we may need to add values validators (styles values and attributes values) and then objects will be the only solution to keep both - names and values.
- I removed support for function and regexp based validators, since they were not used anywhere and aren't serializable (so they cannot be easily reused on e.g. PHP side). Instead, we may want to introduce string validators with wildcards, e.g.:
attributes: 'data-*'
. Extracted to: #10202.
comment:6 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:97b4f24 on dev and c7b659d on tests.
I reported this while working on http://drupal.org/node/1894644.