it seems that the call
$document->setMetadata
in .../plugins/content/phocaopengraph/phocaopengraph.php
on line 111
does already a htmlspecialchars conversion on its own* (?):
Test: if I insertat line 111 for test purposes,
in the html head shows correctly:strangely enough:
*this works for the $value part only (second argument of $document->setMetadata)
but not for the name part (first argument of $document->setMetadata)
-----------
using Joomla 5.3.0 / PHP 8.4.3
$document->setMetadata
in .../plugins/content/phocaopengraph/phocaopengraph.php
on line 111
does already a htmlspecialchars conversion on its own* (?):
Test: if I insert
Code:
$document->setMetadata(htmlspecialchars($name, ENT_COMPAT, 'UTF-8'), '& < > "', $typeString);
in the html head shows correctly:
Code:
<meta property="og:title" content="& < > "">
*this works for the $value part only (second argument of $document->setMetadata)
but not for the name part (first argument of $document->setMetadata)
-----------
using Joomla 5.3.0 / PHP 8.4.3
Statistics: Posted by Dirk67 — 13 May 2025, 11:04