Project

General

Profile

Actions

Bug #14481

open

XHTML content in a WPushButton via WSting::tr is not actually XHTML when containing XHTML entities

Added by Matthias Van Ceulebroeck 5 days ago. Updated 1 day ago.

Status:
Implemented @Emweb
Priority:
Normal
Target version:
Start date:
04/17/2026
Due date:
% Done:

0%

Estimated time:

Description

In case of a WPushButton receiving content from a resolved localized string, even if the TextFormat is set to XHTML, it will always be rendered as Plain in case the string contains an XHTML entity.
A simple test case:

<message id="test">
  <p>Dos &amp; Don'ts</p>
</message>

And then adding the button with:

root()->addNew<Wt::WPushButton>(Wt::WString::tr("test"), Wt::TextFormat::XHTML);

The resulting content of the button will be <p>Dos &amp; Don'ts</p>, instead of the expected Dos & Don'ts.

Actions #1

Updated by Matthias Van Ceulebroeck 5 days ago

  • Status changed from InProgress to Review
  • Assignee deleted (Matthias Van Ceulebroeck)
Actions #2

Updated by Romain Mardulyn 5 days ago

  • Assignee set to Romain Mardulyn
Actions #3

Updated by Romain Mardulyn 5 days ago

  • Target version set to 4.13.2
Actions #4

Updated by Romain Mardulyn 1 day ago

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Romain Mardulyn to Matthias Van Ceulebroeck
Actions

Also available in: Atom PDF