in reply to Re^8: Larger profile pic than 80KB?
in thread Larger profile pic than 80KB?

Although HTML5 allows named character references without a leading ampersand

Are you completely sure about that? I don't see how it would work in practice as there are enough genuine words in many languages which might precede a semi-colon and then would be ambiguous, eg. baring; would get parsed into bå which would be surprising to say the least.


🦛

Replies are listed 'Best First'.
Re^10: Larger profile pic than 80KB?
by kcott (Archbishop) on Oct 23, 2023 at 20:38 UTC
    "Are you completely sure about that?"

    Well I was: I argued the same as you when I first encountered it. I even recall giving a similar example where it would fail.

    However, looking into it a bit further, I find (in "HTML Living Standard: 13.1.4 Character references"):

    "Character references must start with a U+0026 AMPERSAND character (&)."

    So, you're right and I'm wrong for the current iteration of the (perpetual WIP) HTML5 standard. I dislike these so-called "living documents" for this very reason. Anyway, thanks for prompting me to re-research this. ++

    — Ken

Re^10: Larger profile pic than 80KB?
by kcott (Archbishop) on Oct 26, 2023 at 07:55 UTC

    This an update to my previous reply, two days ago.

    It occurs to me that what I had seen was a required, leading ampersand and an optional, trailing semicolon.

    I suspect the lack of ampersands in the very long list of "HTML Living Standard: 13.5 Named character references" threw me. I see the Note there mentions "... some appear both with and without the trailing semicolon ...".

    I always include both the ampersand and semicolon. The one exception is in the post above where I was trying to be clever and failed miserably. :-(

    Again, thanks for pointing this out.

    — Ken