close

Filter

loading table of contents...

Release Notes / Version 11.2307

Table Of Contents

P2TagFilter Deprecated and Replaced by ReservedClassToElementFilter

Class P2TagFilter had a bug with additional attributes (except class ). With this change, processing of CoreMedia Rich Text to generate XHTML is no longer performed by P2TagFilter but ReservedClassToElementFilter . Blueprint's default rich text filter configuration has been adjusted accordingly. Class P2TagFilter is now deprecated.

If customization of rich text filtering is required and P2TagFilter had previously been used for this, consider adapting configuration of bean reservedClassToElementFilter in BlueprintRichtextFiltersConfiguration accordingly.

For example, P2TagFilter may have been used for a mapping like this:

  • Rich Text

<p class="p--address">Some Address</p>
  • HTML

<address>Some Address</address>

The corresponding configuration of P2TagFilter would have been:

@Bean
  P2TagFilter p2TagFilter() {
    P2TagFilter filter = new P2TagFilter();
    filter.setMapping(Map.of(
       // ...
       "p--address", "address"
    ));
    return filter;
  }

An equivalent configuration using ReservedClassToElementFilter can then look like this:

@Bean
ReservedClassToElementFilter reservedClassToElementFilter() {
  return new ReservedClassToElementFilter(List.of(
          /* ... */
          // <p class="p--address"> -> < address >
          ReservedClassToElementConfig.of("p", "p--address", "address"))
  ));
}

(CMS-22251)

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.