WordPress / press-this

Press This is a little tool that lets you grab bits of the web and create new posts with ease. It will even allow you to choose from images or videos included on the page and use them in your post. Use Press This as a quick and lightweight way to highlight another page on the web.
49 stars 22 forks source link

blogspot links aren't parsed correctly #21

Open jpluimers opened 6 years ago

jpluimers commented 6 years ago

I've seen this happen with other blogspot links as well: these don't parse into output at all (they mis title and body):

So both global (.com) and local (.nl) blogspot sites are affected.

--jeroen

dshanske commented 6 years ago

The regex requires that meta properties use ". Blogspot is using ', regex needs to be updated to accept either single or double quotes.

jpluimers commented 6 years ago

@dshanske : Ouch. RegEx "parsing" always reminds me of https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 (:

Not being a web-developer, but knowing most browsers use a DOM before rendering, I was kind of expecting the page to be loaded in the background, DOM being set-up, then walked for useful information.

Good to know the technology behind the parsing, as it gives me a better idea on what is possible/impossible from a parsing perspective.

Related to https://github.com/WordPress/press-this/issues/11