Page 1 of 1

Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 07 Oct 2017, 11:08
by canvon
Hi,

when an article contains an HTML br tag to have a hard line break (without starting a new paragraph, so, e.g., there is no additional margin/padding), all facebook / open graph plugins I've tried simply removes the tag, so the line break is replaced by .. nothing. This is suboptimal, as it merges the last word before and the first word after the br tag to a single word, which possibly does not make any sense.

Please replace the br tag by a space, by a real line break (newline character?) or even make it configurable in the plugin options. (e.g., if a line break is not possible, it could in my case make sense to replace the br tag by " / " (space, slash, space) to signalize that a new unit of sense (sorry for my bad english) is starting.)

Regards,
Fabian

Re: Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 08 Oct 2017, 13:03
by Jan
Ok, thank you for the info.

Jan

Re: Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 09 Oct 2017, 13:28
by canvon
Hi,

minimal fix: https://files.canvon.de/patch/joomla/pl ... n2-br.diff

This at least avoids merging unrelated words. For the site at hand, it'd still be better if it would be configurable to replace with " / ", or if it could simply become an '\n'.

By the way, you seem to be explicitly replacing line breaks with a space. I'm new to this; how would Facebook react to a newline still in the description? As far as I know, when you post something on Facebook, you can have line breaks in your typed text. Is that not allowed for og:description from a website?

Regards,
Fabian

Re: Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 09 Oct 2017, 14:16
by canvon
Ok, I've googled and asked people I know, and it does not seem possible to get a line break in the URL preview when sharing on Facebook.

Re: Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 12 Oct 2017, 14:53
by Jan
Ok, thank you for the info.

Jan

Re: Open Graph - Please make it possible to expand HTML br tag in og:description

Posted: 26 Oct 2017, 15:30
by Jan
Hi, added in version 3.1.1 (Content Plugin) and 3.0.3 (System Plugin)

https://www.phoca.cz/news/958-phoca-ope ... 3-released

Jan