GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Daniel Hernández (daniel@mstdn.degu.cl)'s status on Thursday, 18-Jan-2024 04:05:58 JST Daniel Hernández Daniel Hernández
    • Evan Prodromou

    ActivityPub defines a stream of objects whose content is essentially text, but can include HTML tags. For example, "<p>I <em>really</em> like strawberries!</p>" (wich I take from Example 8 in https://www.w3.org/TR/activitypub/).

    In https://cosocial.ca/@evan/111771562317992298, @evan distinguishes short-form text (e.g., Mastodon 500 characters posts) from long-form text (WordPress article entries). Short-form text does not require much markup, but long-form text may require it to share a faithful copy of an article.

    Currently, a WordPress blog does not look the same on Mastodon because the HTML elements are changed. For example, @evan blog entry https://evanp.me/2023/12/26/big-fedi-small-fedi/ has the element `<h2 class="wp-block-heading">Big Fedy</h2>`, which Mastodon shows as `<p><strong>Big Fedy</strong></p>`. I don't know who changed the original document structure (Mastodon or WordPress) but it appears that the HTML elements were modified to avoid breaking the Mastodon UX. I imagine that if we include SVG code directly on WordPress pages, these code may be complicated to render on Mastodon, even when the browser supports SVG rendering.

    @evanprodromou, which HTML fragment is allowed for the content of an ActivityPub object?

    #ActivityPub

    In conversation Thursday, 18-Jan-2024 04:05:58 JST from mstdn.degu.cl permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Big Fedi, Small Fedi
      from Evan Prodromou
      As I often do, I made a poll on the fediverse about two concepts I am interested in: Big Fedi versus Small Fedi. Although I think these are interesting topics, I couldn’t come up with exact s…

    2. No result found on File_thumbnail lookup.
      Evan Prodromou (@evan@cosocial.ca)
      from Evan Prodromou
      @flipboard@flipboard.video @mike@flipboard.social and @coachtony@me.dm I loved this conversation. BUT. You didn't talk about the elephant in the room: federation of long-form text! We have two major platforms that produce long-form text (WordPress and write.as). Does Tony see the realtime mixing of these text streams as a net positive or negative? How would incorporating long form text from the fediverse into Medium impact the experience for readers?
    • Embed this notice
      Evan Prodromou (evan@cosocial.ca)'s status on Thursday, 18-Jan-2024 04:05:57 JST Evan Prodromou Evan Prodromou
      in reply to

      @daniel @evanprodromou That's a great question! I think that WordPress downscales its HTML to share with Mastodon and uses a `Note` object instead of an `Article`. I'd love to see better support of `Article` for Mastodon.

      In terms of the subset of HTML to use, I don't think we have a definition in the ActivityPub spec. I know that a lot of services and apps scrub HTML sent from a client or from remote servers, but I think the scrubbing process is implementation dependent. I'll open a ticket!

      In conversation Thursday, 18-Jan-2024 04:05:57 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Domain Details Page
    • Embed this notice
      Evan Prodromou (evan@cosocial.ca)'s status on Thursday, 18-Jan-2024 04:22:04 JST Evan Prodromou Evan Prodromou
      in reply to

      @daniel @evanprodromou I made a new issue here:

      https://github.com/w3c/activitypub/issues/419

      tl;dr Mastodon has a defined subset of HTML it supports.

      In conversation Thursday, 18-Jan-2024 04:22:04 JST permalink
    • Embed this notice
      Evan Prodromou (evan@cosocial.ca)'s status on Thursday, 18-Jan-2024 22:01:55 JST Evan Prodromou Evan Prodromou
      in reply to
      • Julian Lam
      • Steven Pemberton

      @daniel @devnull @evanprodromou @stevenpemberton Using HTML is an important part of AP.

      In conversation Thursday, 18-Jan-2024 22:01:55 JST permalink
    • Embed this notice
      Daniel Hernández (daniel@mstdn.degu.cl)'s status on Thursday, 18-Jan-2024 22:01:56 JST Daniel Hernández Daniel Hernández
      in reply to
      • Evan Prodromou
      • Julian Lam
      • Steven Pemberton

      @devnull @evan @evanprodromou

      Yes, sanitizing HTML elements will produce interoperability problems.

      I would trust the input if it satisfies a given schema. Otherwise, I would try to fix unclosed elements to match the requirements for the object type content. At the last resource, instead of sanitizing elements, I would delete them and leave only the text. This idea is in the robustness principle: Be conservative in what you do, be liberal in what you accept from others. I also think this principle should be used with caution.

      I feel a little disappointed on how we are facing problems that were resolved a long time ago. When Web content was understood as XML documents, each element had a specific syntax that could be validated. Elements were composable, and we were able to define declarative mappings to, for example, implement the downscale needed by the Mastodon UX to render a WordPress article. In this regard, I agree with most @stevenpemberton's arguments in his "The 100 years web" talk (https://www.youtube.com/watch?v=jl4fnY4BjEY). But, this is probably a story for another thread.

      In conversation Thursday, 18-Jan-2024 22:01:56 JST permalink

      Attachments

      1. The 100 year web
        from Steven Pemberton
        The keynote at the Balisage Conference on how to create a 100 year web. The slides are here: https://www.cwi.nl/~steven/Talks/2018/07-31-balisage/
    • Embed this notice
      Julian Lam (devnull@crag.social)'s status on Thursday, 18-Jan-2024 22:01:59 JST Julian Lam Julian Lam
      in reply to
      • Evan Prodromou

      @evan @daniel @evanprodromou unrelatedly, #nodebb sanitizes post content too, and I did think it was a little weird that #ActivityPub sends HTML back and forth.

      It all boils down to never trusting user input (that includes input from servers acting as intermediaries!)

      I would rather see #markdown passed around, but that's just me 😊

      In conversation Thursday, 18-Jan-2024 22:01:59 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        speeds.it
    • Embed this notice
      Evan Prodromou (evan@cosocial.ca)'s status on Thursday, 18-Jan-2024 22:50:21 JST Evan Prodromou Evan Prodromou
      in reply to

      @daniel 1. Probably. 2. No. https://www.w3.org/wiki/Activity_Streams/Primer/Article_and_Note 3. No.

      In conversation Thursday, 18-Jan-2024 22:50:21 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Activity Streams/Primer/Article and Note - W3C Wiki
    • Embed this notice
      Daniel Hernández (daniel@mstdn.degu.cl)'s status on Thursday, 18-Jan-2024 22:50:23 JST Daniel Hernández Daniel Hernández
      in reply to
      • Evan Prodromou

      @evan @evanprodromou

      Your answer suggests the following (which is quite interesting):

      1. `Note` and `Article` seem to have implicitly associated a different HTML subset.

      2. An object (with a single ID) can have two representations and belong to two classes, `Note` and `Article`. I assume that these classes are not disjoint. This may lead to ontological inconsistencies.

      3. The downscaling looks like a type casting that depends on the capacities of one endpoint (it may not be needed between two WordPress instances). The downscaling seems to be done by WordPress, whereas it may also be done by Mastodon when representing the object. This sounds like content negotiation.

      In conversation Thursday, 18-Jan-2024 22:50:23 JST permalink
    • Embed this notice
      Evan Prodromou (evan@cosocial.ca)'s status on Thursday, 18-Jan-2024 23:59:44 JST Evan Prodromou Evan Prodromou
      in reply to

      @daniel yes, you are correct. Right now, long-form text publishers need to interface with Mastodon, and Mastodon doesn't support `Article` types very well. I'd love to see Mastodon's support for `Article` improve so long-form publishers can use that type instead.

      In conversation Thursday, 18-Jan-2024 23:59:44 JST permalink
    • Embed this notice
      Daniel Hernández (daniel@mstdn.degu.cl)'s status on Thursday, 18-Jan-2024 23:59:45 JST Daniel Hernández Daniel Hernández
      in reply to
      • Evan Prodromou

      @evan Regarding 2, it seems that in this case the ActivityStreams specification is not followed when your WordPress article is displayed as a note because it has many paragraphs.

      In conversation Thursday, 18-Jan-2024 23:59:45 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.