CE 2.1.1
set short_description for product x to
<ul><li>foo</li><li>bar</li></ul>
view html source of product page and look out for og:description
<meta property="og:description" content="foobar">
<meta property="og:description" content="<ul><li>foo</li><li>bar</li></ul>">
$block->stripTags() is missing in vendor\magento\module-catalog\view\frontend\templates\product\view\opengraph\general.phtml
@heldchen Thanks for reporting. Issue MAGETWO-59826
I confirm that this issue is still happening in Magento CE 2.1.5
As a workaround, would the new code be?:
<meta property="og:description" content="<?php echo $block->escapeHtml($block->stripTags($block->getProduct()->getShortDescription())); ?>" />
Would we need to leave escapeHtml in?
Thanks.
yes, to have " within your description text encoded properly
This issue was fixed for develop branch.
Closed.
Hi @veloraven,
Are there any plans to backport this fix?
I've applied the fix described here but I'm still getting html tags when I share products on Facebook. I'm using 2.1.6
Sorry for my post. Changing file as it is described here: https://github.com/magento/magento2/issues/6776
fixed my issue.
Thanks,
Gabriela
Hello, I've applied the fix in general.phtml but after a while, when I added a new product I was getting an exception on product pages. I had to delete the file to have products displaying again. So, I think you should have to keep this issue opened.
Most helpful comment
yes, to have
"within your description text encoded properly