#microformats 2014-08-14

2014-08-14 UTC
KevinMarks, KevinMarks_, KevinMarks3, tantek, andicascadesf, gRegor` and KartikPrabhu joined the channel
tantek, KevinMarks, Loqi, iwaim, uf-wiki-visitor, statonjr, KartikPrabhu, andicascadesf, Soopaman, krendil, barnabywalters, adactio, robmorrissey, elux, TallTed and philipashlock joined the channel
#
webmaint
edited /hcard-examples-in-wild (+109) "/* new and uncategorized examples */"
(view diff)
#
webmaint
edited /hcard-examples-in-wild (+23) "/* new and uncategorized examples */"
(view diff)
Soopaman, TallTed, eschnou, gRegor`, MacTed, barnabywalters_, philipashlock, bret, Loqi, KevinMarks, barnabywalters, robmorrissey, Garbee, krendil, tantek, adactio and kylewm joined the channel
#
KartikPrabhu
question by kylewm about the mf2 parsing of Known check ins posts -- bunch of javascript shows up in the "content"; is that a parser bug or a markup bug? https://kylewm.com/api/mf2?url=http://werd.io/2014/ben-werdmller-posted-checked-into-sonoma-county-fairground
#
KartikPrabhu
good point. are mf2-parsers supposed to ignore the <script> contents while looking for e-content.value?
#
KartikPrabhu
tantek any insight? ^
#
aaronpk
I would imagine the contents of the script tag should not appear in the "value"
#
aaronpk
since that's what the browser does
#
KartikPrabhu
aaronpk: intersting then that the HTML parser used by mf2py does not respect that
#
KartikPrabhu
neither does php-mf2 I think
#
aaronpk
correct
#
KartikPrabhu
kylewm: definitely open an issue on mf2py... could resolve it if that is the consensus
#
KartikPrabhu
kylewm: iirc mf2py does not do the <img> -> alt/src for e-content as said here: http://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
#
kylewm
oh yeah, neither does php-mf2
#
kylewm
and it would break some assumptions if we started
#
KartikPrabhu
it would?
#
kylewm
(makes it hard to distinguish notes with an autogenerated title from articles with a title)
#
KartikPrabhu
the e-content.value should not have html elements in it anyway
#
kylewm
s/title/name
#
Loqi
kylewm meant to say: (makes it hard to distinguish notes with an autogenerated name from articles with a name)
#
KartikPrabhu
kylewm: how so?
#
KartikPrabhu
articles with name should just have a p-name != e-content.value yes?
#
kylewm
exactly
#
kylewm
so the question is if i say <div class="h-entry">This is me at summer camp: <img src=".." alt="me at camp"/></div>
#
kylewm
the p-name will be "This is me at summer camp:" and the e-content.value will be "This is me at summer camp: me at camp"
#
kylewm
right
#
KartikPrabhu
no p-name should also have the alt according to p-parsing rules
#
kylewm
based on "else use the textContent of the .h-x for name "
#
KartikPrabhu
we should do the <img> -> alt/src everywhere at once to avoid this problem
#
kylewm
textContent is a well-defined DOM thing?
#
Loqi
yea!
#
tantek
good afternoon #microformats!
#
KartikPrabhu
kylewm: I'm no expert in DOM things :P
#
KartikPrabhu
we might have to force BS to do it somehow
#
kylewm
hi tantek!
#
kylewm
KartikPrabhu: I'm +1 for changing it if we change both to be consistent with each other
#
KartikPrabhu
kylewm: yes. will have to dig through BS innards to see how it is working. Also the whole html5parser vs lxml rabbit hole opens up again
#
kylewm
textContent of a u-photo is blank in Firefox, btw
#
kylewm
I just ran: document.querySelector('.u-photo').textContent
#
KartikPrabhu
kylewm: what happens with textContent on a script tag?
#
tantek
catches up on the img/alt discussion
#
tantek
kylewm: that's a bad alt value
#
tantek
that's where the problem is coming from
#
tantek
and has nothing to do with microformats
#
tantek
alt values should be readable inline with the text that they're in, e.g. if the images don't load, *OR* if someone is using a screen reader.
#
KartikPrabhu
tantek: sure the alt value is not nicely designed/written. but we're just wondering how mf2-parsers should deal with such.
#
KartikPrabhu
atm neither mf2py nor php-mf2 do the img -> alt substitution. and apparently FF does not include alt values in its textContent
#
tantek
so those are two different things
#
tantek
the img->alt substitution is only for e-content value
#
tantek
rather e-* value
#
KartikPrabhu
also for p-* when defaulting to textContent
#
KartikPrabhu
so the question is tantek, if the e-* thingie has a <script> tag in it should everything inside the <script> be deleted for e-*.value or should the contents of the <script> be included?
#
kylewm
KartikPrabhu: no, parsing a p-* property has a different definition than the implied "name"
#
kylewm
right, but that wasn't the question
#
KartikPrabhu
oh I see. hmm
#
irakli
edited /existing-rel-values (+312) "/* non HTML rel values */ Added a new link relation: permission, found in Collection.Document media type spec."
(view diff)
#
tantek
KartikPrabhu: no, parsing p-* is different, that's the point
#
tantek
different from e-* value parsing
#
tantek
KartikPrabhu: re: <script> tag parsing - supposed to follow HTML parsing rules, nothing special there
#
KartikPrabhu
tantek: re: script... yeah it seems both mf2py and php-mf2 incluide the contents in the e-*.value so maybe that is ok... where are these HTML parsing rules anyway?
#
kylewm
KartikPrabhu: OK, I think that means we're good then. document.querySelector('.h-entry .e-content').textContent includes the script contents
#
kylewm
so maybe it's a Known bug
#
kylewm
an unknown Known bug
#
KartikPrabhu
kylewm: oh ok that resolves the issue I suppose
Rastus_Vernon and KevinMarks_ joined the channel