upgrade from 10.1.7 to 10.2.0 removes HTML tags from many pages

Created on 3 January 2024, 11 months ago
Updated 4 January 2024, 11 months ago

Problem/Motivation

I upgraded my site from 10.1.7 to 10.2.0 using composer. No composer errors. Update.php and updatedb caused a cascade of database changes and config changes, none of which presented any errors. Once the full process was done, I noticed a lot of HTML tags were stripped out of many of my pages. This seemed more likely on manually written pages than (fotr example) view generated pages, but i dont see a clear pattern yet.

I see <li> and <figcaption> tags stripped, for example. Their inner text remains, just the tags are gone, but not their parent tags.

Steps to reproduce

idk, beyong upgrade

Proposed resolution

idk

Remaining tasks

idk

User interface changes

none

API changes

none

Data model changes

idk

Release notes snippet

πŸ› Bug report
Status

Closed: duplicate

Version

10.2 ✨

Component
OtherΒ  β†’

Last updated about 6 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @xem8vfdh
  • I updated the issue summary. You must surround inline code with the <code> tag.

    Are the tags missing when viewing content, or in CKEditor, or in both?

    What are the filter formats? What are their configurations?

  • Status changed to Postponed: needs info 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I think this might be a duplicate of πŸ› FilterHtml data loss when iframe and/or textarea is allowed Active

  • Sorry about the missing code wrapping.

    I'm using CKEditor 5 both before and after the upgrade.

    The content type I am using for this example uses the "Basic HTML" text format.

    The associated configuration includes:

    Enabled Filters:

    • Limit allowed HTML tags and correct faulty HTML
    • Align Images
    • Caption Images
    • Track Images Uploaded Via Text Editor
    • Lazy Load Images
    • Correct Fault and Chopped Off HTML
    • Embed Media

    Filter Processing Order:

    1. Limit allowed HTML tags and correct faulty HTML
    2. Align Images
    3. Caption Images
    4. Track images uploaded via text editor
    5. Lazy load images
    6. Correct faulty or chopped off HTML
    7. Embed media

    Limit Allowed HTML Tags And Correct Faulty HTML:

    <br> <p class> <h1 class="text-align-left text-align-center text-align-right text-align-justify"> <h2 id class="text-align-left text-align-center text-align-right text-align-justify"> <h3 id class="text-align-left text-align-center text-align-right text-align-justify"> <h4 id class="text-align-left text-align-center text-align-right text-align-justify"> <h5 id class="text-align-left text-align-center text-align-right text-align-justify"> <h6 id class="text-align-left text-align-center text-align-right text-align-justify"> <ul class type> <div class id data-oembed-url> <img class src alt height width data-caption data-align data-entity-type data-entity-uuid> <table class cellpadding align> <cite> <footer> <dl> <dt> <dd> <oembed> <figure> <small> <span class> <iframe src scrolling type title bgcolor allowtransparency width height frameborder align> <figcaption class> <a hreflang target href aria-label title class id rel> <blockquote cite class> <ol type start> <hr class> <td padding class rowspan colspan> <drupal-media data-capture title data-entity-type data-entity-uuid alt data-caption data-align> <strong> <em> <code> <sub> <sup> <li> <tr> <th rowspan colspan> <thead> <tbody> <tfoot> <caption>
    

    Composer Update Log

    $ composer update 
    Gathering patches for root package.
    No patches supplied.
    > DrupalComposerManaged\ComposerScripts::preUpdate
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 14 installs, 59 updates, 0 removals
      - Upgrading asm89/stack-cors (v2.1.1 => v2.2.0)
      - Upgrading behat/mink (v1.10.0 => v1.11.0)
      - Upgrading behat/mink-browserkit-driver (v2.1.0 => v2.2.0)
      - Upgrading behat/mink-selenium2-driver (v1.6.0 => v1.7.0)
      - Upgrading composer/ca-bundle (1.3.7 => 1.4.0)
      - Upgrading composer/composer (2.6.5 => 2.6.6)
      - Upgrading composer/semver (3.3.2 => 3.4.0)
      - Upgrading consolidation/annotated-command (4.9.1 => 4.9.2)
      - Upgrading drupal/core (10.1.7 => 10.2.0)
      - Upgrading drupal/core-composer-scaffold (10.1.7 => 10.2.0)
      - Upgrading drupal/core-dev (10.1.7 => 10.2.0)
      - Upgrading drupal/core-project-message (10.1.7 => 10.2.0)
      - Upgrading drupal/core-recommended (10.1.7 => 10.2.0)
      - Upgrading drupal/imce (3.0.10 => 3.0.11)
      - Locking google/protobuf (v3.25.1)
      - Upgrading guzzlehttp/guzzle (7.7.1 => 7.8.1)
      - Upgrading guzzlehttp/psr7 (2.5.1 => 2.6.2)
      - Upgrading instaclick/php-webdriver (1.4.16 => 1.4.18)
      - Upgrading mglaman/composer-drupal-lenient (1.0.3 => 1.0.4)
      - Locking micheh/phpcs-gitlab (1.1.0)
      - Upgrading nikic/php-parser (v4.17.1 => v4.18.0)
      - Locking open-telemetry/api (1.0.1)
      - Locking open-telemetry/context (1.0.0)
      - Locking open-telemetry/exporter-otlp (1.0.1)
      - Locking open-telemetry/gen-otlp-protobuf (1.0.0)
      - Locking open-telemetry/sdk (1.0.4)
      - Locking open-telemetry/sem-conv (1.23.1)
      - Locking php-http/discovery (1.19.2)
      - Locking php-http/guzzle7-adapter (1.0.0)
      - Locking php-http/httplug (2.4.0)
      - Locking php-http/promise (1.2.1)
      - Upgrading phpspec/prophecy (v1.17.0 => v1.18.0)
      - Upgrading phpspec/prophecy-phpunit (v2.0.2 => v2.1.0)
      - Upgrading phpstan/phpdoc-parser (1.24.4 => 1.24.5)
      - Upgrading phpstan/phpstan (1.10.47 => 1.10.50)
      - Upgrading phpunit/php-code-coverage (9.2.29 => 9.2.30)
      - Upgrading psy/psysh (v0.11.22 => v0.12.0)
      - Upgrading sebastian/complexity (2.0.2 => 2.0.3)
      - Upgrading sebastian/lines-of-code (1.0.3 => 1.0.4)
      - Upgrading seld/jsonlint (1.10.0 => 1.10.1)
      - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.0)
      - Upgrading symfony/console (v6.3.9 => v6.4.2)
      - Upgrading symfony/dependency-injection (v6.3.10 => v6.4.2)
      - Upgrading symfony/deprecation-contracts (v3.3.0 => v3.4.0)
      - Upgrading symfony/error-handler (v6.3.5 => v6.4.0)
      - Upgrading symfony/event-dispatcher (v6.3.2 => v6.4.2)
      - Upgrading symfony/event-dispatcher-contracts (v3.3.0 => v3.4.0)
      - Upgrading symfony/http-foundation (v6.3.9 => v6.4.2)
      - Upgrading symfony/http-kernel (v6.3.10 => v6.4.2)
      - Upgrading symfony/lock (v6.4.0 => v6.4.2)
      - Locking symfony/mailer (v6.4.2)
      - Upgrading symfony/mime (v6.3.5 => v6.4.0)
      - Upgrading symfony/phpunit-bridge (v6.4.1 => v6.4.2)
      - Upgrading symfony/polyfill-ctype (v1.27.0 => v1.28.0)
      - Upgrading symfony/polyfill-iconv (v1.27.0 => v1.28.0)
      - Upgrading symfony/polyfill-intl-grapheme (v1.27.0 => v1.28.0)
      - Upgrading symfony/polyfill-intl-idn (v1.27.0 => v1.28.0)
      - Upgrading symfony/polyfill-intl-normalizer (v1.27.0 => v1.28.0)
      - Upgrading symfony/polyfill-mbstring (v1.27.0 => v1.28.0)
      - Locking symfony/polyfill-php82 (v1.28.0)
      - Upgrading symfony/polyfill-php83 (v1.27.0 => v1.28.0)
      - Upgrading symfony/process (v6.3.4 => v6.4.2)
      - Upgrading symfony/psr-http-message-bridge (v2.2.0 => v6.4.2)
      - Upgrading symfony/routing (v6.3.10 => v6.4.2)
      - Upgrading symfony/serializer (v6.3.10 => v6.4.2)
      - Upgrading symfony/service-contracts (v3.3.0 => v3.4.1)
      - Upgrading symfony/string (v6.3.9 => v6.4.2)
      - Upgrading symfony/translation-contracts (v3.3.0 => v3.4.1)
      - Upgrading symfony/validator (v6.3.9 => v6.4.2)
      - Upgrading symfony/var-dumper (v6.3.8 => v6.4.2)
      - Upgrading symfony/var-exporter (v6.3.10 => v6.4.2)
      - Upgrading symfony/yaml (v6.3.8 => v6.4.0)
      - Upgrading twig/twig (v3.6.1 => v3.8.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 14 installs, 59 updates, 0 removals
    Gathering patches for root package.
    No patches supplied.
    Gathering patches for dependencies. This might take a minute.
      - Upgrading drupal/core-composer-scaffold (10.1.7 => 10.2.0): Extracting archive
    php-http/discovery contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
    Do you trust "php-http/discovery" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
      - Installing php-http/discovery (1.19.2): Extracting archive
      - Upgrading drupal/core-project-message (10.1.7 => 10.2.0): Extracting archive
      - Upgrading mglaman/composer-drupal-lenient (1.0.3 => 1.0.4): Extracting archive
      - Upgrading composer/ca-bundle (1.3.7 => 1.4.0): Extracting archive
      - Upgrading symfony/polyfill-mbstring (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/polyfill-intl-normalizer (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/polyfill-intl-grapheme (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/polyfill-ctype (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/string (v6.3.9 => v6.4.2): Extracting archive
      - Upgrading symfony/service-contracts (v3.3.0 => v3.4.1): Extracting archive
      - Upgrading symfony/deprecation-contracts (v3.3.0 => v3.4.0): Extracting archive
      - Upgrading symfony/console (v6.3.9 => v6.4.2): Extracting archive
      - Upgrading composer/semver (3.3.2 => 3.4.0): Extracting archive
      - Upgrading twig/twig (v3.6.1 => v3.8.0): Extracting archive
      - Upgrading symfony/yaml (v6.3.8 => v6.4.0): Extracting archive
      - Upgrading symfony/translation-contracts (v3.3.0 => v3.4.1): Extracting archive
      - Upgrading symfony/polyfill-php83 (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/validator (v6.3.9 => v6.4.2): Extracting archive
      - Upgrading symfony/serializer (v6.3.10 => v6.4.2): Extracting archive
      - Upgrading symfony/routing (v6.3.10 => v6.4.2): Extracting archive
      - Upgrading symfony/http-foundation (v6.3.9 => v6.4.2): Extracting archive
      - Upgrading symfony/psr-http-message-bridge (v2.2.0 => v6.4.2): Extracting archive
      - Upgrading symfony/process (v6.3.4 => v6.4.2): Extracting archive
      - Upgrading symfony/polyfill-iconv (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/polyfill-intl-idn (v1.27.0 => v1.28.0): Extracting archive
      - Upgrading symfony/mime (v6.3.5 => v6.4.0): Extracting archive
      - Upgrading symfony/event-dispatcher-contracts (v3.3.0 => v3.4.0): Extracting archive
      - Upgrading symfony/event-dispatcher (v6.3.2 => v6.4.2): Extracting archive
      - Installing symfony/mailer (v6.4.2): Extracting archive
      - Upgrading symfony/var-dumper (v6.3.8 => v6.4.2): Extracting archive
      - Upgrading symfony/error-handler (v6.3.5 => v6.4.0): Extracting archive
      - Upgrading symfony/http-kernel (v6.3.10 => v6.4.2): Extracting archive
      - Upgrading symfony/var-exporter (v6.3.10 => v6.4.2): Extracting archive
      - Upgrading symfony/dependency-injection (v6.3.10 => v6.4.2): Extracting archive
      - Upgrading guzzlehttp/psr7 (2.5.1 => 2.6.2): Extracting archive
      - Upgrading guzzlehttp/guzzle (7.7.1 => 7.8.1): Extracting archive
      - Upgrading asm89/stack-cors (v2.1.1 => v2.2.0): Extracting archive
      - Upgrading drupal/core (10.1.7 => 10.2.0): Extracting archive
      - Upgrading symfony/phpunit-bridge (v6.4.1 => v6.4.2): Extracting archive
      - Upgrading symfony/lock (v6.4.0 => v6.4.2): Extracting archive
      - Upgrading nikic/php-parser (v4.17.1 => v4.18.0): Extracting archive
      - Upgrading sebastian/lines-of-code (1.0.3 => 1.0.4): Extracting archive
      - Upgrading sebastian/complexity (2.0.2 => 2.0.3): Extracting archive
      - Upgrading phpunit/php-code-coverage (9.2.29 => 9.2.30): Extracting archive
      - Upgrading phpstan/phpstan (1.10.47 => 1.10.50): Extracting archive
      - Upgrading phpstan/phpdoc-parser (1.24.4 => 1.24.5): Extracting archive
      - Upgrading phpspec/prophecy (v1.17.0 => v1.18.0): Extracting archive
      - Upgrading phpspec/prophecy-phpunit (v2.0.2 => v2.1.0): Extracting archive
      - Installing php-http/promise (1.2.1): Extracting archive
      - Installing php-http/httplug (2.4.0): Extracting archive
      - Installing php-http/guzzle7-adapter (1.0.0): Extracting archive
      - Installing symfony/polyfill-php82 (v1.28.0): Extracting archive
      - Installing open-telemetry/sem-conv (1.23.1): Extracting archive
      - Installing open-telemetry/context (1.0.0): Extracting archive
      - Installing open-telemetry/api (1.0.1): Extracting archive
      - Installing open-telemetry/sdk (1.0.4): Extracting archive
      - Installing google/protobuf (v3.25.1): Extracting archive
      - Installing open-telemetry/gen-otlp-protobuf (1.0.0): Extracting archive
      - Installing open-telemetry/exporter-otlp (1.0.1): Extracting archive
      - Installing micheh/phpcs-gitlab (1.1.0): Extracting archive
      - Upgrading instaclick/php-webdriver (1.4.16 => 1.4.18): Extracting archive
      - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.0): Extracting archive
      - Upgrading seld/jsonlint (1.10.0 => 1.10.1): Extracting archive
      - Upgrading composer/composer (2.6.5 => 2.6.6): Extracting archive
      - Upgrading behat/mink (v1.10.0 => v1.11.0): Extracting archive
      - Upgrading behat/mink-selenium2-driver (v1.6.0 => v1.7.0): Extracting archive
      - Upgrading behat/mink-browserkit-driver (v2.1.0 => v2.2.0): Extracting archive
      - Upgrading drupal/core-dev (10.1.7 => 10.2.0)
      - Upgrading drupal/core-recommended (10.1.7 => 10.2.0)
      - Upgrading drupal/imce (3.0.10 => 3.0.11): Extracting archive
      - Upgrading psy/psysh (v0.11.22 => v0.12.0): Extracting archive
      - Upgrading consolidation/annotated-command (4.9.1 => 4.9.2): Extracting archive
    3 package suggestions were added by new dependencies, use `composer suggest` to see details.
    Generating autoload files
    96 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    PHP CodeSniffer Config installed_paths set to ../../drupal/coder/coder_sniffer,../../sirbrillig/phpcs-variable-analysis,../../slevomat/coding-standard
    phpstan/extension-installer: Extensions installed
    > composer/composer: installed
    > mglaman/phpstan-drupal: installed
    > phpstan/phpstan-deprecation-rules: installed
    > phpstan/phpstan-phpunit: installed
    Scaffolding files for drupal/core:
      - Skip [project-root]/.editorconfig: overridden in pantheon-upstreams/drupal-composer-managed
      - Skip [project-root]/.gitattributes: overridden in pantheon-upstreams/drupal-composer-managed
      - Copy [web-root]/INSTALL.txt from assets/scaffold/files/drupal.INSTALL.txt
      - Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt
      - Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php
      - Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml
      - Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php
    Scaffolding files for pantheon-systems/drupal-integrations:
      - Skip [web-root]/sites/default/settings.php because it already exists and overwrite is false.
    > DrupalComposerManaged\ComposerScripts::postUpdate
    No security vulnerability advisories found
    

    updatedb Log

     ------------ ------------------- --------------- ----------------------------- 
      Module       Update ID           Type            Description                  
     ------------ ------------------- --------------- ----------------------------- 
      system       10101               hook_update_n   10101 - Change the {batch} table [bid] field to serial.                      
      system       10201               hook_update_n   10201 - Clear left over entries in the revision data table.                  
      help         10200               hook_update_n   10200 - Install search index table for help topics.                      
      ckeditor5    list_multiblock     post-update     Updates Text Editors using CKEditor 5.                  
      ckeditor5    list_start_reversed   post-update     Updates Text Editors using CKEditor 5 to native List "start" functionality.       
      file         add_default_filename_sanitization_configuration   post-update     Add default filename sanitization configuration.                                                    
      filter       sort_filters        post-update     Sorts filter format filter configuration.               
      help         add_permissions_to_roles   post-update     Grant all admin roles the 'access help pages' permission.                  
      help         help_topics_search   post-update     Install or update config for help topics if the search module installed.     
      help         help_topics_uninstall   post-update     Uninstall the help_topics module if installed.         
      media        set_blank_iframe_domain_to_null   post-update     Updates media.settings:iframe_domain config if it's still at the default.                 
      path_alias   drop_path_alias_status_index   post-update     Remove the path_alias__status index.    
      system       add_description_to_entity_form_mode   post-update     Update description for form modes.                       
      system       add_description_to_entity_view_mode   post-update     Update description for view modes.                                                         
      system       mailer_dsn_settings   post-update     Add new default mail transport dsn.               
      system       mailer_structured_dsn_settings   post-update     Add new default mail transport dsn.               
      system       remove_asset_entries   post-update     Remove redundant asset state and config.            
      system       remove_asset_query_string   post-update     Remove redundant asset query string state.          
      system       set_blank_log_url_to_null   post-update     Updates system.theme.global:logo.url config if it's still at the default.                 
      update       set_blank_fetch_url_to_null   post-update     Updates update.settings:fetch.url config if it's still at the default.                     
      views        add_missing_labels   post-update     Add labels to views which don't have one.              
      views        remove_default_argument_skip_url   post-update     Remove default_argument_skip_url setting.                     
      views        remove_skip_cache_setting   post-update     Remove the skip_cache settings.                    
      views        taxonomy_filter_user_context   post-update     Removes User context from views with taxonomy filters.                     
     ------------ ------------------- --------------- ----------------------------- 
    
    
     Do you wish to run the specified pending updates? (yes/no) [yes]:
     > yes
    
    >  [notice] Update started: system_update_10101
    >  [notice] Update completed: system_update_10101
    >  [notice] Update started: system_update_10201
    >  [notice] Update completed: system_update_10201
    >  [notice] Update started: help_update_10200
    >  [notice] Update completed: help_update_10200
    >  [notice] Update started: ckeditor5_post_update_list_multiblock
    >  [notice] Update completed: ckeditor5_post_update_list_multiblock
    >  [notice] Update started: ckeditor5_post_update_list_start_reversed
    >  [notice] Update completed: ckeditor5_post_update_list_start_reversed
    >  [notice] Update started: file_post_update_add_default_filename_sanitization_configuration
    >  [notice] Update completed: file_post_update_add_default_filename_sanitization_configuration
    >  [notice] Update started: filter_post_update_sort_filters
    >  [notice] Update completed: filter_post_update_sort_filters
    >  [notice] Update started: help_post_update_add_permissions_to_roles
    >  [notice] Update completed: help_post_update_add_permissions_to_roles
    >  [notice] Update started: help_post_update_help_topics_search
    >  [notice] Update completed: help_post_update_help_topics_search
    >  [notice] Update started: help_post_update_help_topics_uninstall
    >  [notice] Update completed: help_post_update_help_topics_uninstall
    >  [notice] Update started: media_post_update_set_blank_iframe_domain_to_null
    >  [notice] Update completed: media_post_update_set_blank_iframe_domain_to_null
    >  [notice] Update started: path_alias_post_update_drop_path_alias_status_index
    >  [notice] Update completed: path_alias_post_update_drop_path_alias_status_index
    >  [notice] Update started: system_post_update_add_description_to_entity_form_mode
    >  [notice] Update completed: system_post_update_add_description_to_entity_form_mode
    >  [notice] Update started: system_post_update_add_description_to_entity_view_mode
    >  [notice] Update completed: system_post_update_add_description_to_entity_view_mode
    >  [notice] Update started: system_post_update_mailer_dsn_settings
    >  [notice] Update completed: system_post_update_mailer_dsn_settings
    >  [notice] Update started: system_post_update_mailer_structured_dsn_settings
    >  [notice] Update completed: system_post_update_mailer_structured_dsn_settings
    >  [notice] Update started: system_post_update_remove_asset_entries
    >  [notice] Update completed: system_post_update_remove_asset_entries
    >  [notice] Update started: system_post_update_remove_asset_query_string
    >  [notice] Update completed: system_post_update_remove_asset_query_string
    >  [notice] Update started: system_post_update_set_blank_log_url_to_null
    >  [notice] Update completed: system_post_update_set_blank_log_url_to_null
    >  [notice] Update started: update_post_update_set_blank_fetch_url_to_null
    >  [notice] Update completed: update_post_update_set_blank_fetch_url_to_null
    >  [notice] Update started: views_post_update_add_missing_labels
    >  [notice] Update completed: views_post_update_add_missing_labels
    >  [notice] Update started: views_post_update_remove_default_argument_skip_url
    >  [notice] Update completed: views_post_update_remove_default_argument_skip_url
    >  [notice] Update started: views_post_update_remove_skip_cache_setting
    >  [notice] Update completed: views_post_update_remove_skip_cache_setting
    >  [notice] Update started: views_post_update_taxonomy_filter_user_context
    >  [notice] Update completed: views_post_update_taxonomy_filter_user_context
     [success] Finished performing updates.
    

    Analysis

    The editor config appears untouched by the upgrade. All of the settings are the same before and after the upgrade.

    Before the upgrade, I had a page with a block of HTML appearing in the top level of the Editor--Source pane, which I tracked through various stages pre and post-upgrade. Below are my findings.

    Before Upgrade

    In Database

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%">
          <figcaption><em>EXAMPLE CAPTION TEXT.</em></figcaption>
       </figure>
    </div>
    

    On Rendered Page

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%">
          <figcaption><em>EXAMPLE CAPTION TEXT.</em></figcaption>
       </figure>
    </div>
    

    From Editor--Source

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%">
          <figcaption>
             <em>EXAMPLE CAPTION TEXT.</em>
          </figcaption>
       </figure>
    </div>
    

    After Upgrade

    In Database

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%">
          <figcaption><em>EXAMPLE CAPTION TEXT.</em></figcaption>
       </figure>
    </div>
    

    On Rendered Page

    This is where the breaking starts, note the missing <figcaption> and <em> tags.

    <div class="col-md-6">
       <figure><img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%">EXAMPLE CAPTION TEXT.</figure>
    </div>
    

    From Editor--Source

    The system has replaced my <figcaption> tag with a <p> tag. The <em> is preserved here.

    <div class="col-md-6">
        <figure>
            <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%" height="100%">
            <p>
                <em>EXAMPLE CAPTION TEXT.</em>
            </p>
        </figure>
    </div>
    

    After Upgrade, Edit, Save (no changes)

    In Database

    The bad tag transformation is persisted to the database :(

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%" height="100%">
          <p><em>EXAMPLE CAPTION TEXT.</em></p>
       </figure>
    </div>
    

    On Rendered Page

    The <em> is missing now...

    <div class="col-md-6">
       <figure>
          <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%" height="100%" loading="lazy">
          <p>EXAMPLE CAPTION TEXT.</p>
       </figure>
    </div>
    

    From Editor--Source

    <div class="col-md-6">
        <figure>
            <img src="/sites/default/files/assets/example.jpg" alt="EXAMPLE CAPTION TEXT" width="100%" height="100%">
            <p>
                <em>EXAMPLE CAPTION TEXT.</em>
            </p>
        </figure>
    </div>
    
  • @larowlan thank you for pointing me to that other issue. It may indeed be the same issue I'm having. I commented there, linking back to my detailed comment here: https://www.drupal.org/project/drupal/issues/3410303#comment-15382742 πŸ› FilterHtml data loss when iframe and/or textarea is allowed Active

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    It would be useful if you could test the committed fix from the other issue and clarify if that resolves this

  • Do you know how to do that? I use drupal/core-composer-scaffold, so I can't merely upgrade to a pinned commit (I don't think).

    I do have cweagans/composer-patches, so I suppose I could turn the target commit into a patch that gets applied post composer update... is this the commit? https://git.drupalcode.org/project/drupal/-/commit/cb6d01843ebad4f86a0c3...

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Yeap, you can use git.drupalcode.org/project/drupal/-/commit/cb6d01843ebad4f86a0c3.diff

  • @larowlan, I have tested that commit patch with cweagans/composer-patches and my tentative testing suggests it did indeed fix the problem! I will report this on the other issue as well.

  • Status changed to Closed: duplicate 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Thanks mate, it's one of about 5-6 criticals β†’ in 10.2.0 we've fixed this week and we hope to have 10.2.1 out before the end of the week. One left and we're good to go.

  • awesome, thanks for all the work, i/we really appreciate it

Production build 0.71.5 2024