#microformats 2017-11-06

2017-11-06 UTC
[eddie] joined the channel
#
tantek
edited /Special:Log/block () "blocked [[User:Wwwlampungservicecom]] with an expiry time of infinite (account creation disabled): Spamming links to external sites"
(view diff)
tantek, [kevinmarks], gRegorLove, KartikPrabhu, [keithjgrant] and sebsel joined the channel
#
gRegorLove
Looks like php-mf2's innertext method when called on an element like <script class="p-json-ld">skips it, because script is one of the excluded elements. https://github.com/indieweb/php-mf2/blob/master/Mf2/Parser.php#L436
#
gRegorLove
It's obscure and a weird example, but exists: https://00dani.me/
strugee joined the channel
strugee joined the channel
#
aaronpk
I did think <script> was skipped for security reasons but I don't quite remember the whole thing
iwaim, tantek, [kevinmarks], ben_thatmustbeme, [xavierroy], [pfefferle], pniedzielski[m], AlanPearce[m], schmarty, TheGillies, barpthewire and globbot joined the channel
#
Zegnat
sknebel and I had a bit of a thinking and can’t come up with any security risks. And if there are any security risks those apply to every other element as well, because I could put the JS code in a DIV and that will get parsed with class="p-anything" too.
#
Zegnat
I think the original idea was to do innerText in such a way that displayed text only got recorded. E.g. if I had a <style scoped> within my h-entry, I probably don’t want the CSS blob in any of my properties, even if I put my property class on a direct parent of the STYLE element.
#
Zegnat
Same goes for SCRIPT elements.
#
Zegnat
If I put the actual property on the SCRIPT or STYLE element though, I think there is no reason why the parser should then explicitly ignore that property. It should just apply innerText to those elements. And any hypothetical (that is HTML non-conforming) nested SCRIPT and STYLE should then be skipped, of course.
pniedzielski[m] and [kevinmarks] joined the channel
#
[kevinmarks]
Putting JSON-LD into microformats as a blob seems a bit weird. You could put schema elements in more directly http://www.kevinmarks.com/microformatschema.html
#
Loqi
[Kevin Marks] Microformats 2 and Schema 2015-06-30
[pfefferle] joined the channel
#
Zegnat
Putting a JSON blob in there might be a bit weird. I am commenting more on parsing spec and implementation then this one specific use case
#
Zegnat
If she had put the same JSON blob in a PRE with p-json-ld parsers would have picked it up. I know why we would be skipping SCRIPT and STYLE etc in an innerText implementation. But don't see a reason for skipping them if they are the container element
nitot and tantek joined the channel
#
[kevinmarks]
well, it is against the visible data principle: http://microformats.org/wiki/principles
#
Loqi
principles
#
Zegnat
That's fine if the spec then gets a list of not-to-parse HTML elements. The spec doesn't, it is made to be forwards compatible with new html and parses classes on all elements.
#
Zegnat
E.g. OBJECT (probably bad example) isn't skipped in any way. I could put a p- on that and it should work. But skipping SCRIPT is somehow different?
#
sknebel
go look at stuff, not your phone :)
[pfefferle], nitot, nitot_ and JohnBeales joined the channel
#
Zegnat
Now that I have looked at stuff... My main point is that I don't like building exceptions for specific elements in the parsing spec. That's what it would be if we codify e.g. Go's current behaviour into the spec.
gRegorLove, nitot, tantek, nitot_, [miklb], vivus, [chrisaldrich] and KartikPrabhu joined the channel
#
sknebel
since aaronpk just mentioned h-review: shouldn't http://microformats.org/wiki/h-review define "p-rating" as "a value between p-worst and p-best", not fixed 1-5? or am I misunderstanding what best and worst are for?
#
Loqi
h-review
#
aaronpk
probably
#
aaronpk
although i am confused about "p-best - define best rating value. can be numerically lower than worst"
#
aaronpk
i guess someone can use an inverse scale? 1=best 5=worse
[eddie], tantek and pniedzielski[m] joined the channel
#
gRegorLove
That was my reading of it.
pniedzielski[m] and KartikPrabhu joined the channel
#
Zegnat
That was the reading sknebel and I also came too, yeah. E.g. German grading from 6 (worst) to 1 (best)
pniedzielski[m] and tantek joined the channel