Skip to content

Conversation

@Ratheshan03
Copy link
Contributor

Purpose

Adds UTF-8 character encoding directives to JSP files that were missing them, ensuring proper unicode character handling across authentication and account management pages.

Description

JSP pages without explicit character encoding can have issues rendering unicode characters, especially for internationalization and localized content. This PR addresses this by adding the proper encoding directive to all JSP files that were missing it.

Changes Made

  • Added <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> to 76 JSP files
  • Directive placed after copyright headers and before any imports or code
  • Excluded webpack template files that dynamically set encoding via htmlWebpackPlugin.options.contentType

Files Modified

Modified JSP files in:

  • identity-apps-core/apps/accounts/src/main/webapp/includes/*.jsp (16 files)
  • identity-apps-core/apps/authentication-portal/src/main/webapp/**/*.jsp (44 files)
  • identity-apps-core/apps/recovery-portal/src/main/webapp/**/*.jsp (14 files)
  • identity-apps-core/apps/x509-certificate-authentication-portal/src/main/webapp/includes/*.jsp (10 files)
  • apps/console/src/auth.jsp (1 file)
  • apps/myaccount/src/auth.jsp (1 file)

Related Issues

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

Developer Checklist (Mandatory)

  • Complete the Developer Checklist in the related product-is issue to track any behavioral change or migration impact.

- Add contentType and pageEncoding directives to 76 JSP files
- Ensures proper unicode character handling across authentication pages
- Fixes potential character encoding issues in localized content
- Follows JSP best practices for internationalization

Addresses issue #25744
@brionmario
Copy link
Member

Hey @Ratheshan03,

Thanks for the PR.

Can you please explain how you tested the changes?
Can we get some screenshots of a page on the Authentication Endpoint with the encoding tag you added visible on the browser DEv Tools?

Copy link
Member

@pavinduLakshan pavinduLakshan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t need to add this tag to every individual JSP file. Including it once in a reusable component within the /includes directory should automatically apply it to all pages that use that component.

@brionmario
Copy link
Member

Hey @Ratheshan03,

Any update on the above comment: #9417 (comment)

@Ratheshan03
Copy link
Contributor Author

Hi, @brionmario,

Sry, got into some other works.
I'll try to make the requested changes and verify it properly this weekend.

Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authentication Portal: Incomplete Language Rendering

3 participants