- Issue created by @stephencross
- Assigned to dieterholvoet
- π§πͺBelgium dieterholvoet Brussels
@stephencross can you share an example for markup that is being stripped out?
- πΊπΈUnited States stephencross
I have recorded a quick video. I used Simpleytest.me starting with No non-breaking space filter installed. Added Media and Media Library.
- π§πͺBelgium dieterholvoet Brussels
This happens because of the use of the no_nbsp field formatter. A couple issues here:
- The field formatter is not necessary, the filter works perfectly in itself. I'm not sure why it was added and whether we should keep it. @JosefFriedrich?
- The field formatter uses
$item->value
to get the field value, which bypasses filters, including the media filter that converts it to an img tag.$item->processed
should be used instead.
- Assigned to JosefFriedrich
- π©πͺGermany JosefFriedrich
add 1.: I thought the field formatter would be handy especially when used in views. That's why I think it would be good if it were preserved. The module is used by some installations after all. Possibly, removing the feature would break some installations.
add 2: The way I see it, your proposed 1-line patch would solve the problem, right? @DieterHolvoet could you please apply this patch? The credit belongs to you.
- Open on Drupal.org βCore: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - @dieterholvoet opened merge request.
- last update
over 1 year ago 3 pass - Status changed to Needs review
over 1 year ago 7:47am 26 May 2023 - π§πͺBelgium dieterholvoet Brussels
@stephencross I created a MR, can you test the field formatter again with the MR applied to your project? And for afterwards, don't forget you don't actually need the field formatter.
- πΊπΈUnited States stephencross
@DieterHolvoet That one-line fix works. Thank you.
- last update
over 1 year ago 3 pass -
DieterHolvoet β
committed 9b5eeb34 on 8.x-1.x
Issue #3362181 by DieterHolvoet, stephencross: Embedded media stripped...
-
DieterHolvoet β
committed 9b5eeb34 on 8.x-1.x
- Status changed to Fixed
over 1 year ago 2:59pm 30 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.