ietf-tools / www

A customized CMS for the IETF website
BSD 3-Clause "New" or "Revised" License
23 stars 45 forks source link

adjacent links separated by a space run together #288

Closed ghwood closed 9 months ago

ghwood commented 1 year ago

See for example here: https://wwwstaging.ietf.org/blog/anrp-2023/

ghwood commented 1 year ago
image
mgax commented 9 months ago

The problem seems to be introduced in https://github.com/ietf-tools/wagtail_website/commit/00eb01b: Django's {% spaceless %} template tag removes whitespace between HTML tags, including adjacent links. There is an unmaintained package, django-smartspaceless, that claims to preserve whitespace between inline elements, but I'm not sure it's worth the hassle. Here are some numbers for the homepage response size:

Compression original content {% spaceless %} savings
none 37093 24581 34%
gzip 5677 5090 10%
brotli 5662 5041 11%

Since most people will be accessing the website through Cloudflare, with browsers that support transport compression, perhaps the easy fix of removing {% spaceless %} is acceptable?

rjsparks commented 9 months ago

I have no objection to removing {% spaceless %}. Our big content is not html.