Project

General

Profile

Actions

Bug #14481

closed
MV MV

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

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

Added by Matthias Van Ceulebroeck 5 months ago. Updated 5 months ago.

Status:
Closed
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.

MV Updated by Matthias Van Ceulebroeck 5 months ago Actions #1

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

RM Updated by Romain Mardulyn 5 months ago Actions #2

  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 5 months ago Actions #3

  • Target version set to 4.13.2

RM Updated by Romain Mardulyn 5 months ago Actions #4

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

RM Updated by Romain Mardulyn 5 months ago Actions #5

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom