Problem/Motivation

When the message in the log view have some html code, is not render properly. Image attached.

Proposed resolution

Investigate, create a formatter for the message.

Remaining tasks

User interface changes

Data model changes

Comments

giancarlosotelo created an issue. See original summary.

giancarlosotelo’s picture

StatusFileSize
new86.98 KB
giancarlosotelo’s picture

Status: Active » Needs review
StatusFileSize
new85.12 KB
new1.34 KB

Here is a patch and a screenshot.

miro_dietiker’s picture

Status: Needs review » Needs work

The current formatter has a setting "Formatter" that only allows to select "Plain text".
Instead of offering a new formatter, can we not just annotate in views data that the field is HTML aware and switch to something liks "Restricted HTML"?

miro_dietiker’s picture

Extending a test to write some message with a tag and check that it is not output double encoded might be worth doing.

berdir’s picture

Issue tags: +Needs tests

No, this isn't a format, it doesn't make sense to use one. Formats are configurable and might or might not exist and we have no idea what they allow.

Wondering if there isn't a default field plugin that can print this correctly?

Agreed on tests.

dawehner’s picture

So in other words its a field we already trust its value ... and yeah XSS::filter then ensures that. It could be a helpful core field I guess.

miro_dietiker’s picture

Yeah, that would be great.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new664 bytes
new2.07 KB

Added test.

miro_dietiker’s picture

Status: Needs review » Fixed
Issue tags: -Needs tests

Hmm... Yeah i want it in core, but i guess the feature dreams are over for 8.0.x.. :-)

@giancarlo Please file a core issue and pass the plugin there too.
Since this is not a 8.0.x core subject, i committed to Monitoring.
Note though that once this is in core, we will need to write an update function before we can drop the plugin otherwise things will break hard...

Committed, with some comment improvements.

I find it strange we are not testing for a test message, but a requirements message instead.

The last submitted patch, 3: 2569581-3.patch, failed testing.

Status: Fixed » Needs work

The last submitted patch, 9: 2569581-9.patch, failed testing.

juanse254’s picture

Status: Needs work » Closed (fixed)

The last submitted patch, 3: 2569581-3.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 9: 2569581-9.patch, failed testing.

giancarlosotelo’s picture

Status: Needs work » Closed (fixed)