keithjgrant / omnibear

A Micropub browser extension
MIT License
36 stars 8 forks source link

Reply posting broken: in-reply-to is "[object Object]" #31

Closed cweiske closed 6 years ago

cweiske commented 6 years ago

Omnibear 0.6.0 on Firefox 55 does not correctly send the URL that is replied to:

POST /micropub.php HTTP/1.1
Host: anoweco.bogo
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: application/json
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
authorization: Bearer ZW1vamk9JTVDMzYwJTVDMjM3JTVDMjIyJTVDMjUxJm1lPWh0dHAlM0ElMkYlMkZhbm93ZWNvLmJvZ28lMkZ1c2VyJTJGMi5odG0mY2xpZW50X2lkPWh0dHBzJTNBJTJGJTJGb21uaWJlYXIuY29tJnNjb3BlPXBvc3Qmc2lnbmF0dXJlPUZJWE1F
content-type: application/x-www-form-urlencoded;charset=UTF-8
origin: moz-extension://f571e0d4-11a6-4a2d-b434-997d6f1ec966
Content-Length: 78
DNT: 1
Connection: keep-alive

h=entry&content=This%20is%20cool%21&mp-slug=&in-reply-to=%5Bobject%20Object%5D

I visited http://cweiske.de/tagebuch/kletterwald-leipzig.htm, right-clicked on the first paragraph and said "reply to entry".

cweiske commented 6 years ago

It works on https://aaronparecki.com/2017/09/22/11/. Must be something different with my blog.

keithjgrant commented 6 years ago

I'm pretty sure this is a bug in the microformat parser dependency. It has difficulties on some sites, and I'm unsure why. The short-term solution may be to watch for this and mitigate it somehow, or find a better parser

sknebel commented 6 years ago

Seems like https://github.com/glennjones/microformat-node/issues/40 - mixed mf1 and mf2 confuses it here.

keithjgrant commented 6 years ago

I've made some improvements so Omnibear catches a bad microformat parse like this and will instead reply to the current page url.