Created on 5 October 2023, about 1 year ago
Updated 7 November 2023, about 1 year ago

Problem/Motivation

Looking at the code, I was wondering if it could be greatly simplified?

Proposed resolution

Replace this code:

          $value['value'] = preg_replace('/<drupal-entity(.*)data-entity-type="media"(.*)><\/drupal-entity>/', '<drupal-media${1}data-entity-type="media"${2}></drupal-media>', $originalValue);

with this code:

          $value['value'] = str_replace('<drupal-entity ', '<drupal-media ', $originalValue);
          $value['value'] = str_replace('</drupal-entity>', '</drupal-media>', $value['value']);

Remaining tasks

Review the proposed changes.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ“Œ Task
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

Production build 0.71.5 2024