Asset field "comment": impossible to provision new lines

Description

While finding out about- and trying to work around https://opennms.atlassian.net/browse/NMS-4581#icft=NMS-4581, I tried to provision a "comment" with new lines.

Looking at the database, the webUI writes

<this>
one\r
two
</this>

to the database.

So I tried provisioning "one\rtwo" but that ended up as

<this>
one\rtwo
</this>

in the database and also in the UI. And, in the provisioned case, the "\r" is also displayed as a string.

So I activated
opennms.assets.allowHtmlFields = comments, description

and provisioned "one&lt;br/&gt;two". That looks good when viewing it as an unprivileged user, but is shown as plain html when viewed as an admin (ie the break tag is not interpreted).

So there's no way to provision a new line that works in all situations.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Dominik April 7, 2011 at 8:19 AM

that between the "" should have been
& # x D ;
with s/ //
jira ate it

Dominik April 7, 2011 at 8:18 AM

It is possible to provision "&#xD;" for a line break. Closing ...

Won't Fix

Details

Assignee

Reporter

Affects versions

Priority

PagerDuty

Created April 7, 2011 at 6:16 AM
Updated April 7, 2011 at 8:20 AM
Resolved April 7, 2011 at 8:20 AM

Flag notifications