bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Suyash2JZ
Suyash2JZ
8 Oct 2025

Fix: use UTF-8 safe substr for multibyte support in mod_articles_category
Fixes #45452

Summary of Changes

Replaced the regular substr() function with mb_substr() in mod_articles_category to ensure correct multibyte string handling for UTF-8 encoded text.

Testing Instructions

  1. Create or open a Joomla site with multibyte characters (e.g., accented or non-Latin characters) in article titles or categories.
  2. Display those articles using the "Articles - Category" module.
  3. Verify that the trimming and display of multibyte titles is now correct.

Actual result BEFORE applying this Pull Request

Multibyte characters were sometimes cut off or displayed incorrectly.

Expected result AFTER applying this Pull Request

Multibyte characters are displayed correctly and not truncated.

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar Suyash2JZ Suyash2JZ - open - 8 Oct 2025
avatar Suyash2JZ Suyash2JZ - change - 8 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Oct 2025
Category Modules Front End
avatar HLeithner
HLeithner - comment - 15 Oct 2025

This pull request has been automatically rebased to 5.4-dev.

avatar richard67
richard67 - comment - 23 Oct 2025

@Suyash2JZ Please fix the code style errors, see my previous review suggestions. Thanks in advance.

Update 2025-11-02: I've allowed myself to apply the necessary code style fixes.

avatar richard67 richard67 - change - 23 Oct 2025
Title
Fix: use UTF-8 safe substr in mod_articles_category
[5.4] Fix: use UTF-8 safe substr in mod_articles_category
avatar richard67 richard67 - edited - 23 Oct 2025
avatar richard67 richard67 - change - 2 Nov 2025
Labels Added: bug PR-5.4-dev

Add a Comment

Login with GitHub to post a comment