Skip to content

Three closing "/>" tags #388

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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