Problem/Motivation

The filter.format.ca3_format text format that this recipe installs allows only a small set of tags:

<a href hreflang target rel> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media data-entity-type data-entity-uuid data-view-mode alt data-caption>

Two problems with this list:

  1. <p> is not allowed. Every paragraph in an embedded CA3 fragment gets removed — the paragraph text disappears.
  2. Only a few specific attributes are allowed. Things like data-list-item-id on <li>, data-entity-type / data-entity-uuid / data-entity-substitution / data-lit-original-text on internal link <a> tags, class, id, and any aria-* attributes all get stripped out.

Steps to reproduce

Proposed resolution

Expand the allowed_html setting in config/filter.format.ca3_format.yml so it covers the tags and attributes a CA3 fragment normally contains. Use wildcards (aria-*, class, data-*, id, itemprop, itemscope, itemtype, name)

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hardik_patel_12 created an issue. See original summary.

hardik_patel_12’s picture

Title: Expand ca3_format allowed_html to preserve <p>, data-*, aria-* and common HTML tags so embedded CA3 fragments keep their content » Expand ca3_format allowed_html to preserve <p>, data-*, aria-* and common HTML tags so embedded CA3 entity keep their content
hardik_patel_12’s picture

Issue summary: View changes
hardik_patel_12’s picture

Issue summary: View changes
hardik_patel_12’s picture

Issue summary: View changes

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
supreetam09’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.