Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespaces before <strong> tag are removed, giving incorrect rendering #32

Closed
roadster31 opened this issue Feb 1, 2019 · 4 comments
Closed

Comments

@roadster31
Copy link

roadster31 commented Feb 1, 2019

What is this feature about (expected vs actual behaviour)?

Whitespaces before <strong> tags are removed, giving incorrect rendering :

image

How can I reproduce it?

Try to minify the following code :

<!DOCTYPE html>
<html lang="fr">
<head><title>Test</title></head>
<body>
<p>Visitez notre boutique <strong>eBay</strong> : <a href="https://stores.ebay.fr/CAFE-RACER-OLD-SPARES" target="_blank">https://stores.ebay.fr/CAFE-RACER-OLD-SPARES</a></p>
<p><strong>ID Vintage</strong>, spécialiste de la vente de pièces et accessoires pour motos tout- terrain classiques :<a href="https://id-vintage.com" target="_blank">https://id-vintage.com</a></p>
<p>Magazine <strong>Café-Racer</strong> : <a href="https://www.cafe-racer.fr" target="_blank">https://www.cafe-racer.fr</a></p>
<p><strong>Julien Lecointe</strong> : <a href="https://julien-lecointe.blogspot.com" target="_blank">https://julien-lecointe.blogspot.com</a></p>
</body>
</html>

Does it take minutes, hours or days to fix?

Not sure

Any additional information?

Using version 3.1.30 installed with composer on PHP 7.1

Thanks !

@roadster31 roadster31 changed the title Removed white space before <strong> Whitespaces before <strong> tag are removed, giving incorrect rendering Feb 1, 2019
voku added a commit that referenced this issue Feb 28, 2019
-> but it works here, via "PHP 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec  7 2018 08:15:15) ( NTS )"
@voku
Copy link
Owner

voku commented Feb 28, 2019

Hi, I can't reproduce the issue ... I added a test for PHP 7.0 / 7.1 / 7.2 and is work on all versions. Maybe it's a Windows problem? Do you use Windows or Linux?

@roadster31
Copy link
Author

Hi, I can reproduce the problem on Windows 7 and Debian 8.11

@voku
Copy link
Owner

voku commented Feb 28, 2019

can use please run this commands in your project, thanks

composer check-platform-reqs

ext-dom 20031129 success
ext-json 1.5.0 success
ext-libxml 7.1.25 success
ext-mbstring 7.1.25 success
ext-Phar 2.0.2 success
ext-SimpleXML 7.1.25 success
ext-tokenizer 7.1.25 success
ext-xml 7.1.25 success
ext-xmlwriter 7.1.25 success
php 7.1.25 success

php -i

...
dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.4
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

...

@voku
Copy link
Owner

voku commented Aug 30, 2019

Please feel free to re-open the issue if this is still a problem for you.

PS: If you can add a test-case as phpunit test that would be really helpful, thanks.

@voku voku closed this as completed Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants