[regression] Space inserted before full stop, comma, etc

Created on 25 June 2023, over 1 year ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

This line added in formatter in ๐Ÿ› Stripping HTML tags should leave one whitespace as separation Fixed is changing the behaviour for some edge cases in an unexpected way:

// Add space before each tag to ensure words don't run together.
// Logic via https://stackoverflow.com/questions/12824899/strip-tags-replace-tags-by-space-rather-than-deleting-them
$output = str_replace('<', ' <', $output);

Steps to reproduce

Consider this markup:

Full stop should not be preceded by <em>space</em>.

With this change, will become:

Full stop should not be preceded by space .

Note the space that is inserted before full stop.

Proposed resolution

I wonder if we can't use something like https://github.com/mtibben/html2text for this dirty job

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

๐Ÿ‡ท๐Ÿ‡ดRomania claudiu.cristea Arad ๐Ÿ‡ท๐Ÿ‡ด

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

Comments & Activities

Production build 0.71.5 2024