Home / Admin / Provisioning Groups page generating bad HTML when a provisioning group has an apostrophe in the name

Description

Whilst installing and learning OpenNMS, I added a provisioning group that has an apostrophe in it's name called "Greg's Applecross". I'd like to remove this group since I'm not yet sure exactly what provisioning groups are for, however the HTML being generated by this page isn't properly escaping the apostrophe in the provisioning group name, resulting HTML code similar to below being presented:-

<input type="button" value="Import" onclick="javascript:doAction('Greg's Applecross', 'import')" />
and
<a href="javascript:editRequisition('Greg's Applecross')">EDIT</a>

For fairly obvious reasons, this is causing javascript errors on the page and as a result I'm unable to remove the provisioning group. (or do anything else with it for that matter)

OpenNMS should either (a) escape apostrophes correctly or (b) not allow group names with an apostrophe in it to be added in the first place.

Environment

Operating System: All Platform: PC

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Seth Leger (community account) October 27, 2010 at 6:27 PM

I fixed this problem and some other similar XML-escaping issues on the provisioning UI in commit 31a45db67ff04877c625814db8f3bb316f79aa9d. You should be able to name provisioning groups with ', ", <, &, > and any other XML/Javascript reserved characters that you can dream up. Marking as fixed.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 11, 2010 at 11:03 PM
Updated January 27, 2017 at 4:26 PM
Resolved October 27, 2010 at 6:27 PM

Flag notifications