Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[object Object] issue for some summaries #173

Open
voxpelli opened this issue Apr 6, 2022 · 2 comments
Open

[object Object] issue for some summaries #173

voxpelli opened this issue Apr 6, 2022 · 2 comments
Labels

Comments

@voxpelli
Copy link
Owner

voxpelli commented Apr 6, 2022

See: https://webmention.herokuapp.com/api/embed?version=cutting-edge&url=http://www.kevinmarks.com/twittereditsyou.html

For some reason the .summary of one of the comments there is an object rather than a string, making the presentation fail:

{
    "url": "https://www.jvt.me/mf2/2022/04/zgycn/",
    "name": "Bookmarked\nIn Soviet Musk Twitter, Twitter edits you\nPost detailsWith all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people’s sites.Recommended read:\nTwitter Edits You\nhttp://www.kevinmarks.com/twittereditsyou.htmlWed, 06 Apr 2022 08:04 by  Jamie Tanna\n.\n\n#twitter\n#social-media.",
    "published": 1649228640000,
    "summary": {
        "value": "Bookmarked\nIn Soviet Musk Twitter, Twitter edits you\nPost detailsWith all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people’s sites.",
        "html": "Bookmarked\n<span class=\"u-bookmark-of h-cite\"><a class=\"u-url\" href=\"http://www.kevinmarks.com/twittereditsyou.html\"><span class=\"p-name\">In Soviet Musk Twitter, Twitter edits you</span></a>\n<details open=\"\"><summary>Post details</summary><blockquote class=\"p-summary\">With all the fuss about Twitter&#x2019;s promised edit button, and how they might design it, we&#x2019;re missing a disturbing development &#x2014; Twitter is using its embedded javascript to edit other people&#x2019;s sites.</blockquote><img class=\"u-featured\" src=\"https://www.jvt.me/mf2/2022/04/zgycn/embed-api-delete.png\" loading=\"lazy\" /></details></span><p></p>"
    },
    "author": {
        "name": "Jamie Tanna",
        "photo": "https://www.jvt.me/img/profile.png",
        "url": "https://www.jvt.me/"
    },
    "targets": ["http://www.kevinmarks.com/twittereditsyou.html"],
    "type": "mention",
    "interactions": [],
    "removedTargets": []
}
@voxpelli voxpelli added the bug label Apr 6, 2022
@kevinmarks
Copy link
Contributor

He's using e-summary, not p-summary so you get the more complex structure. Also it looks like you're using an older version of the microformats parser that doesn't suppress implied name when there is a summary.

@voxpelli
Copy link
Owner Author

voxpelli commented Apr 6, 2022

He's using e-summary, not p-summary so you get the more complex structure.

Great, thanks 👍 I'll try to fix it soon

Also it looks like you're using an older version of the microformats parser that doesn't suppress implied name when there is a summary.

Yes, I'm tracking swapping out the parser in #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants