xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
399 stars 42 forks source link

nonstandard spacing around equals sign in chyrplite.net home page #245

Closed timoteostewart closed 3 months ago

timoteostewart commented 6 months ago

On the home page for https://chyrplite.net/ in one of your meta tags there are spaces around the equals sign. It's not standard, and since it's not a particularly important attribute (just the viewport), it might not matter whether visitors' web browsers correctly interpret it or not. But as a courtesy, I thought I would let you know in case you decide to fix it! Here's the entire <head> section of your web page:

<head>
  <meta charset="UTF-8">
  <title>Chyrp Lite</title>
  <meta name="author" content="Daniel Pimley">
  <meta name="description" content="Chyrp Lite is an ultra-lightweight blogging engine, written in PHP.">
  <meta name="viewport" content="initial-scale = 1.0">
  <link rel="icon" sizes="32x32" type="image/x-icon" href="favicon.ico">
  <link rel="icon" sizes="any" type="image/svg+xml" href="favicon.svg">
  <link rel="mask-icon" href="favicon.svg" color="#4f4f4f">
  <link rel="alternate" href="rss/update.xml" type="application/rss+xml" title="Chyrp Lite Releases">
  <link rel="stylesheet" type="text/css" href="css/chyrplite.css">
</head>

And the specific meta tag that has nonstandard spacing around the equals sign is this one here:

  <meta name="viewport" content="initial-scale = 1.0">

Good luck with your Chyrp Lite project! It looks fascinating.

Best, Tim

xenocrat commented 6 months ago

Hello there,

This is based on Apple's weirdly and inconsistently spaced examples from ~2014, when the viewport tag was a proprietary iOS thing. The most recent spec doesn't have much more to say about it, but I agree that without spaces would be more commonly viewed as the correct way to do it, and should work everywhere. I'll change this as soon as I find time.

Thank you for the report and for the kind words!

timoteostewart commented 6 months ago

My pleasure. Thanks for that link to Apple's page. That is very weird of them, but as you note it's quite old. I appreciate knowing about viewport's origins as a proprietary Apple tag. I didn't know that! Very interesting!

I scrape all the web pages that come through Hacker News for my thnr.net "HN reader" website. One of the things I do is analyze the web page to see the self-reported charset and whether it's html, xhtml, or something else. Part of the way the program analyzes this is to look for html, head, meta, title, and other important tags in the web page and see what's in their attributes. Thus, when my program parsed your Chyrp Lite web page, it went crazy in the logs. 😆 Which made me curious enough to see what interesting things your web page was doing.

Since you are no doubt not the only person to occasionally include spaces around the equals sign, I have my own "willfix" for my program to update the regex to allow for spaces to appear around the equals sign. So thanks to your web page, my own program will become slightly more robust for the future. Appreciate it! 🙂

xenocrat commented 6 months ago

That's a fun project, thanks for sharing!