litespeedtech / litespeedtech/lscache_wp

Bug in HTML Minify – Missing spaces after two linebreaks.

Open
#237 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
257
Forks
123
PR merge metrics
No merged PRs in 30d

Description

It looks like the HTML Minify parser is a little bit greedy, if there is more than one linebreak. ;) The parser than **omits a required space.**

You can see it in Example 3 - "Read morehere!" misses the space beween the text "Read more" and the link text "here!". The problem only occurs, if is more than one linebreak.

**Output of the markup below:**

1.) Read more here! [GOOD]
2.) Read more here! [GOOD]
3.) Read morehere! _[BUG - Missing space!]_

**Test markup:**

```


1.) Read more here!


2.) Read more
here!


3.) Read more

here!


```
Reference: [Report in WordPress forum](https://wordpress.org/support/topic/bug-in-html-minify-missing-spaces-after-two-linebreaks/)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied test markup and compare the three rendered outputs, focusing on the HTML Minify parser. Done means the third example preserves the space so it renders as “Read more here!” while the first two examples remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.