Describe the bug
OIDC profile scope name claim value is getting HTML encoded.
To Reproduce
Steps to reproduce the behaviour:
Have a student with special characters in the first or last name, e.g. D'andre Thompson
Assign the profile to a course
Start the course via LTI 1.3
Observe that the name claim is HTML encoded (D'andre Thompson), while given_name and family_name claims are not.
Expected behaviourname claim value is not HTML-encoded (D'andre Thompson)
Possible solutions / proposals
Modify https://github.com/orca-nrw/crossplatform-moodle-lti-plugin/blob/main_311/locallib.php#L924, so that it no-longer HTML-encodes the value, i.e. to $requestparams['lis_person_name_full'] = fullname($USER, true);fullname() by default will produce a displayable value. It's not needed here. The claims must be simple character strings with no additional encoding. Providing true as the second argument will no longer produce a displayable name, but will provision the full name as-is.
Screenshots
If applicable, add screenshots to help explain your problem.
Software versions (please complete the following information):TBD
Describe the bug OIDC profile scope
name
claim value is getting HTML encoded.To Reproduce Steps to reproduce the behaviour:
D'andre Thompson
name
claim is HTML encoded (D'andre Thompson
), whilegiven_name
andfamily_name
claims are not.Expected behaviour
name
claim value is not HTML-encoded (D'andre Thompson
)Possible solutions / proposals Modify https://github.com/orca-nrw/crossplatform-moodle-lti-plugin/blob/main_311/locallib.php#L924, so that it no-longer HTML-encodes the value, i.e. to
$requestparams['lis_person_name_full'] = fullname($USER, true);
fullname()
by default will produce a displayable value. It's not needed here. The claims must be simple character strings with no additional encoding. Providingtrue
as the second argument will no longer produce a displayable name, but will provision the full name as-is.Screenshots If applicable, add screenshots to help explain your problem.
Software versions (please complete the following information): TBD
Additional context TBD