Skip to content

[BUG] Rich Text Editor: Image source shifts to relative path on blur #34807

@adrianjm-dotCMS

Description

@adrianjm-dotCMS

Problem Statement

There is a critical regression in the Rich Text content type. When a user interacts with an image within the editor (clicking to select or edit) and then clicks outside the editor area, the image src attribute is automatically transformed from an absolute path to a relative path.

  • Expected Source: /dA/9bf3ad75d5/dog 2.webp?language_id=1
  • Actual Source (after blur): ../dA/9bf3ad75d5/dog 2.webp?language_id=1

This silent mutation of the DOM breaks image rendering depending on the page's hierarchical depth.

Screen.Recording.2026-02-27.at.4.55.44.PM.mov

Steps to Reproduce

  1. Navigate to a content entry using the Rich Text field or create a new one.
  2. Insert an image or edit existing content with an image using an absolute path.
  3. Click directly on the image inside the editor to focus it.
  4. Click anywhere outside the editor container (triggering the onBlur event).
  5. Inspect the HTML source/code view of the editor.
  6. Observe that the src attribute has been prepended with ../ and the image is broken.

Acceptance Criteria

  • URL Integrity: The src attribute must remain unchanged (absolute path) after the editor loses focus.
  • No Auto-Transformation: Disable any underlying library setting (e.g., TinyMCE, CKEditor) that converts URLs to relative paths.
  • Regression Testing: Verify that saving the content after this interaction does not persist the broken ../ path to the database.

dotCMS Version

dotcms-core 26.02.17-01 (February 17, 2026 12:46 PM)

Severity

Medium - Some functionality impacted

Links

https://dotcms.freshdesk.com/a/tickets/35698

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions