Problem/Motivation

rdf_preprocess_username() makes sure the name of a user is output as a string without language:

  // Because lang is set on the HTML element that wraps the page, the
  // username inherits this language attribute. However, since the username
  // might not be transliterated to the same language that the content is in,
  // we do not want it to inherit the language attribute, so we set the
  // attribute to an empty string.

This function isn't used on user profile page, instead rdf_preprocess_user() is used, but it doesn't include this language stripping.

Proposed resolution

Add same functionality of rdf_preprocess_username() in rdf_preprocess_user() so the RDF outputs match.

This issue will also include tests for user output, split from #1869914: Refactor RdfMappingDefinitionTestCase and split it in dedicated test cases.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Status: Active » Needs review
FileSize
4.67 KB
scor’s picture

added a bit more documentation in rdf_preprocess_user()

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Good catch. This looks good to me.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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