WIth php8.2 somehow strip_tags($variables['content']['field_activity_output_text'][0]['#text']); does not remove the a tag anymore

Created on 18 December 2024, 22 days ago

Problem/Motivation

When using php8.2, the /notification page does not display notification properly.
The event enrollement notification looks like
admin has enrolled to the event <a href="/node/6" hreflang="en">new event for admin to enroll</a> you are organizing
instead of
admin has enrolled to the event new event for admin to enroll you are organizing

Steps to reproduce

Use php 8.2
Use social distribution 13.0.0-alpha21
Follow the behat test" Scenario: Event manager gets a notification for an event enrollment " to see the notification

Proposed resolution

Update
$variables['content']['field_activity_output_text'][0]['#text'] = strip_tags($variables['content']['field_activity_output_text'][0]['#text']);
To
$variables['content']['field_activity_output_text'][0]['#text'] = strip_tags(html_entity_decode($variables['content']['field_activity_output_text'][0]['#text']));

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.6

Component

Code

Created by

🇳🇱Netherlands deneus18

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

Comments & Activities

Production build 0.71.5 2024