Hello,
First hello and thanks for Piwigo (this is my first post)
I have found one problem with new Metadata Open Graph extension: if description contains HTML tags the og:description property is not stripped of them, which causes problems, eg.:
<meta property="og:description" content=" 13 May 2019 <!--complete--> <div class="title">Poznań</div> ">
Piwigo version: 2.10.2
PHP version: 7.4
MySQL version: 5.5.5
Offline
Hi :-)
you've html in your description ?
Offline
Hi :-)
can you go
http://piwigo.org/svn/extensions/meta_og/
download main.inc.php and test
Offline
Thanks!
Yes, I use Extended Description plugin and some HTML tags to make my album descriptions look the way I want.
The updated version works better, but for some reason is not fully compatible with Extended Description. The [lang] tag works fine, but <!--complete--> <!--more--> do not work as expected. I tried to change in your code
if (isset($pwg_loaded_plugins['ExtendedDescription'])){ add_event_handler('AP_render_content', 'get_user_language_desc');
to
if (isset($pwg_loaded_plugins['ExtendedDescription'])){ add_event_handler('AP_render_content', 'get_extended_desc');
which shoudl be more generic, but it did not work neither. Any ideas?
Offline
Hi :-)
@mjp
for more / complete ... I must see but I don't know yet what I chose for the tag
Offline
Hi :-)
new bera relase
if plugin Extended descriptions is activate, on album page only short description or top description is use for og:description
Offline
Hi,
Just registered here to post about a pretty similar/related issue, so I guess it's appropriate to use this thread (sorry if it isn't).
I just installed version 0.7.beta7 of Metadata Open Graph, and I noticed that quotes are not escaped in the description, causing a pretty bad bug when the description does contain quotes (actually I'm surprised it doesn't totally break the page).
For instance, if you check the source code of this page https://gal.patheticcockroach.com/picture.php?/53/ , you'll notice (text truncated by me for clarity):
<meta property="og:description" content="The Sixth Sense version of the well-known "I see dumb people"">
I would expect something like:
<meta property="og:description" content="The Sixth Sense version of the well-known "I see dumb people"">
I suspect we're missing a htmlspecialchars() somewhere ?
Offline
Hi :-)
Thanks for your post I look when I look
Offline