Kentico().PageDescription() meta tags fail kentico HTML validation

James de Boer asked on April 30, 2025 18:50

On pages with the Description meta tag created using @Html.Kentico().PageDescription() helper from https://docs.kentico.com/13/developing-websites/retrieving-content/displaying-page-content

The meta tag has a closing and generates the following info message when using the kentico HTML validation in the Admin site.

"Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."

This is not really a problem but it would be nice if there was a way to get the HTML validation completely clean. Is there any way of interacting with the @Html.Kentico().PageDescription() helper to stop it putting the closing tag in?

Tag created looks like this

< meta content="Blah blah blah" name="description" />

   Please, sign in to be able to submit a new answer.