#barnabywaltersexcluding the content of these elements from the plaintext value makes perfect sense
#barnabywaltersbut for me, removing it from the HTML value shouldn’t be something the generic parser does
#barnabywaltersthat’s a job for a sanitization stage, which is going to be different depending on the use case of the consumer
#barnabywalterse.g. the <style> element could be used to provide per-post custom styling (maybe using the scoped attribute)
#barnabywaltersand <script> could be used for publishing interactive HTML documents
#barnabywalters(I think I actually did this once, will try to find the example)
#barnabywaltersas aaronpk says, people who don’t want these effects, or the potential attacks which could results from including <style> and <script> elements need to remove them anyway
#barnabywaltersso why make the parser do that, and prevent people who do want to get the original HTML content from being able to do so?
#aaronpkhm, maybe it does make sense to keep them for e-* properties, but remove them from all plaintext values
#barnabywalterskeep plaintext values as slim and as user-focused as possible, as the big reason they’re there is as an easy alternative to processing the HTML content
#barnabywaltersand in much the same way is presumably a sanitisation stage, applied to the results of parsing using a generic parser?
#aaronpkyeah after the mf2 parsing, xray goes into any HTML values and does sanitization
#barnabywaltersI’d like to get tantek’s input on my objection, as well as anyone actively working on mf2 parsers. I’ll try to express it more concisely and add it to the wiki page
#aaronpkyeah, worth noting that on the wiki vote section
#aaronpkoh and XRay does the whole "is the name a prefix of the content" thing to un-imply the p-name property
#aaronpkone particularly clever thing XRay does when sanitizing HTML is it removes all class names from HTML attributes except mf2 classes :D
#barnabywaltersedited /microformats2-parsing-issues (+590) "/* exclude style elements before parsing */ added agreement to removing style and script contents from plaintext properties, objection to removing them from HTML properties" (view diff)
#barnabywalterssounds like xray is doing a very similar job to the mf2 post-processing code I wrote for shrewdness
#aaronpki'm currently using it for webmention.io, and will soon be using it for my reader
#barnabywaltersthat produced a more or less flat dictionary of reliable properties based on extensive normalisation and post-processing of raw mf2 structures
#barnabywaltersnow I realise I could have just written the extra libraries hard-coded into taproot for quick editing, and copied them into standalone libraries separately
#barnabywalters(most of the things I’m talking about are pretty self contained, just one file and one test file)
#barnabywaltersbut without evidence that for the generic parser to not remove style and script elements from the raw HTML content is a major burden for microformats consumers, I’m against making changes which arbitrarily remove information
#tantekhowever, I think we should still remove them from *all* the other property prefixes (u-* dt-*)
#barnabywaltersyep, absolutely, everything which is plaintext
#barnabywaltersincluding the value property in html/value structs (do we have a good name for those?)
#barnabywalterseverything plaintext is safe, the html property is where people go if they want a hard time ;)
#barnabywaltersaaronpk: shall I go ahead and adapt your php-mf2 PR to remove <script> and <style> from everything apart from html properties, and merge? Then I can publish a new release this evening
#tantekedited /microformats2-parsing-issues (+444) "/* exclude style elements before parsing */ Proposal 2, e-* properties HTML values preserve all markup, others drop style and script elements and their content" (view diff)
#aaronpkbarnabywalters: sorry, was afk. thanks and yes feel free to update my PR
#barnabywaltersme too, cool, will do when kylewm chimes in on the issue
#tantekalso, thanks to a lot of hard work by glennjones, his microformatshiv parser has landed in Firefox and is now in the Firefox Developer Release if you want to try it out
#tantekIndieWebCamp participant Shane Caraveo (@mixedpuppy) helped work the parser into the code and handle all the landing / source control / test case details
#Loqitantek meant to say: e.g. - so how can I tell that there's an mf2 parser in FF?
#tantekaaronpk: anyway, there's also tons more awesome DevTools improvements in this version of FF Dev Edition, so you might find it interesting to check out for webdev in general