Remove Drupal translation placeholder tag from log description

Created on 15 March 2023, over 1 year ago

Problem/Motivation

Some log's description is translated by Drupal t() function, which will add Drupal translation placeholder html tags into the description string.
For example, on the line 38 in event_log_track_auth.module
https://git.drupalcode.org/project/events_log_track/-/blob/3.1.4/modules...

Those html tags won't be used, as they will be stripped on line 222 in OverviewForm.php
https://git.drupalcode.org/project/events_log_track/-/blob/3.1.4/modules...

Also, syslog won't need those html tags neither.

Steps to reproduce

  1. Enable event_log_track_auth module.
  2. Login via /user/login.
  3. At this point, there is a event log recorder in the database event_log_track table. Such as,

       <em class="placeholder">test author</em> (uid <em class="placeholder">2</em>)
      

Proposed resolution

Strip all tags before outputting to database or syslog.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024