Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new Description tag in site and group configs #70

Merged
merged 6 commits into from
Jul 17, 2014

Conversation

gschneider-r7
Copy link
Contributor

This is needed to support site and group descriptions with newline characters in an upcoming Nexpose release. This change should be backwards-compatible, though, and can probably be merged in at any time. The <Description> tag is ignored by current Nexpose versions and is optional for future versions.

@@ -99,6 +99,7 @@ def to_xml
xml = %(<AssetGroup id="#{@id}" name="#{replace_entities(@name)}")
xml << %( description="#{replace_entities(@description)}") if @description
xml << '>'
xml << "<Description>#{replace_entities(@description)}</Description>" if @description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix this XML generate (for the whole class) from String manipulation to REXML, adding a as_xml method, then the to_xml just calls as_xml.to_s.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I've added a new commit with these changes.

mdaines-r7 added a commit that referenced this pull request Jul 17, 2014
Add support for new Description tag in site and group configs
@mdaines-r7 mdaines-r7 merged commit 0ec2b93 into rapid7:master Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants