#microformats 2023-07-27

2023-07-27 UTC
[KevinMarks], [bradleyallen], TechLifeWeb, IWDiscord, saptaks, m5zs7k, sknebel, trwnh, Zegnat, willnorris, jeremycherfas, JSharp, IWSlackGateway, [tw2113_Slack_], [tantek], Fulani_jr, ancarda, darylsun, capjamesg, greenfork, [benatwork], gRegor, yolk, sivoais, ehmry, sebbu, Saphire, strugee_, omz13, Kaja, aaronpk, voxpelli, GWG, phae, angelo, vladimyr, [0x3b0b], olaf[m], fgn470[m], sara2 and sarajaksa joined the channel
#
sarajaksa
I have a question as part of my preparation for the Send a Friend a Webmention Day this weekend. I was wondering, if there is microformats to indicate, that some post was dedicated or gifted to somebody?
#
sarajaksa
My use case is, that for the Webmention day, I am hoping to finish a story, based on the concept shared by James in one of the previous Homebrew club. I want to dedicate the story to him, but I don't know what is the IndieWeb/microformats way to do this. I am also no using this functionality on other sites, since I don't know how to mark it.
#
sarajaksa
Basically, I want to have somehow in the HTML structure, to indicate that something was a gift in the same way of how Archive of Our Own is implementing gifts. This is an example of the gifts, that are dedicated to the Elon Musk: https://archiveofourown.org/gifts?recipient=Elon+Musk (Even though I am certain, that Elon does not have an account on that site)
gRegor and [KevinMarks] joined the channel
#
Zegnat
sarajaksa: interesting! I do not think gifts have been discussed as something that needs to be discoverable from the HTML. I had not seen AO3s implementation, but that is some fun prior art to think about!
[schmarty], [snarfed] and ari1 joined the channel
#
[snarfed]
[Joel_Auterson] and I have been debugging the mf2 parsing behavior where it replaces <img>s in e-*/p-* with their alt text or src. looks like it's not new parsing behavior, but it still surprised him/us a bit. https://github.com/snarfed/bridgy/issues/1527
#
Loqi
[preview] [JoelOtter] #1527 Using silo-specific content breaks formatting
#
j​kingweb
I just wrote some tests for that very thing today.
#
j​kingweb
Unfortunately no two implementations did the same thing.
#
j​kingweb
For what it's worth the lack of space around substituted alt-text is consistent with what browsers do. If you don't put any space around the image or inside the alt-text, the browser won't insert any.
#
j​kingweb
`<img alt="*" src="http://invalid.invalid/">Foo` renders as `*Foo` in both Chrome and Firefox.
btrem and [tantek] joined the channel
#
[tantek]
That is correct and the intent and a good reason to explicitly include space(s) or punctuation inside alt text if you need it adjacent to the surrounding content.
#
[tantek]
(literally why I started writing many img alt texts as a sentence ending with a period!)
#
j​kingweb
As I understand, though, both php-mf2 and mf2py implement the *other* text massaging algorithm, which does things differently and actually trims alt-text.
#
gRegor
Is this parsing an e-*? Parsing spec says to add a space at beginning and end of the alt or src attribute when replacing https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
#
j​kingweb
It does not, if my understanding of English grammar is corect. The clause about wrapping in spaces is to the one side of a semicolon, which makes it only applies to the src case, not the alt case (or the absence-of-either-attribute case).
#
j​kingweb
That URL resolution is mentioned _after_ adding spaces also re0inforces this.
#
gRegor
I think that's a typo. I think the intent is to get the alt or src value, wrap the result in spaces
#
j​kingweb
The history says you wrote it, so I can't argue too strongly. 😛
#
gRegor
haha, it's definitely a confusing sentence that should be clarified :)
#
Loqi
[preview] [Zegnat] #17 Define removal of SCRIPT and STYLE elements everywhere textContent is requested.
#
j​kingweb
But like I said: the src-only interpretation is consistent with the substitution browsers do, so I think it should probably be what mf2 does as well.
#
gRegor
Quite possibly. I think my reading would cause issues when `alt=""`, parsing it as two blank spaces, so I might be misremembering. 2018 was too long ago. XD
IWSlackGateway, [aciccarello], [pfefferle], [tantek], [schmarty], [snarfed] and [KevinMarks] joined the channel