Problem/Motivation

The link text that is used to generate strucuted data can be a render array with a #markup tag. In such case, if a link text contains " character it can end up as such in the markup.

In the best case, this causes validation errors in the Structured Data Testing Tool.

Proposed resolution

Alter breadcrumb.html.twig so it escapes JS characters before printing the output.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3053461-structured-data-2.patch654 bytesmbovan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
FileSize
654 bytes

This fixes the problem for us.

pivica’s picture

Status: Needs review » Reviewed & tested by the community

This looks a bit crazy that we need to do all that, but it makes sense.

pivica’s picture

Issue tags: +next-release

  • pivica committed 5ea9a4d on 8.x-1.x authored by mbovan
    Issue #3053461 by mbovan: Link title in the structured breadcrumb data...
pivica’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.