Skip to content

Three closing "/>" tags #388

@ndcstudio

Description

@ndcstudio

The pdoPage snippet contains a piece of code that has three closing "/>" tags.

if (!empty($setMeta)) {
    $canurl = $paginator->pdoTools->config(“scheme”) !== “full”
        ? $paginator->getCanonicalUrl($url)
        : $url;
    $modx->regClientStartupHTMLBlock(“<link rel="canonical" href="” . $canurl . “"/>”);
    if ($data[$pageVarKey] > 1) {
        $prevUrl = $paginator->makePageLink($canurl, $data[$pageVarKey] - 1);
        $modx->regClientStartupHTMLBlock(
            “<link rel="prev" href="” . $prevUrl . “"/>”
        );
    }
    if ($data[$pageVarKey] < $data[$pageCountVar]) {
        $nextUrl = $paginator->makePageLink($canurl, $data[$pageVarKey] + 1);
        $modx->regClientStartupHTMLBlock(
            “<link rel="next" href="” . $nextUrl . “"/>”
        );
    }
}

Unfortunately, these closures cause an error in the W3C validator:
Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions