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

DIsplayHtmlWithImages: added the dynamic section script #26945

Merged
merged 6 commits into from May 29, 2023

Conversation

ilappe
Copy link
Contributor

@ilappe ilappe commented May 23, 2023

Related Issues

fixes: https://jira-hq.paloaltonetworks.local/browse/CRTX-81822

Description

Added a new dynamic-section script in order to display HTML with image reference as cid:image_id

Screenshots

image

Minimum version of Cortex XSOAR

  • 6.5.0

Copy link
Contributor

@DeanArbel DeanArbel left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Contributor

@idovandijk idovandijk left a comment

Choose a reason for hiding this comment

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

Please see comment for now. I'm running a few more tests

email_cc = custom_fields.get('emailcc')
email_to = custom_fields.get('emailto')
email_subject = custom_fields.get('emailsubject')
email_html = custom_fields.get('renderedhtmll', '') or \
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix renderedhtmll to be renderedhtml

Copy link
Contributor

@idovandijk idovandijk left a comment

Choose a reason for hiding this comment

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

Please note that if all fields are empty it's showing some data. It should be empty instead:
image

Also when Rendered HTML was empty and Email HTML had data, the dynamic section showed all the "None" values and only then displayed the data that it was supposed to display:
image

Other than this it looked fine in my tests, great job

Copy link
Contributor

@idovandijk idovandijk left a comment

Choose a reason for hiding this comment

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

Great!

@ilappe ilappe merged commit b44b2e3 into master May 29, 2023
15 of 16 checks passed
@ilappe ilappe deleted the ilappe/CRTX-81882/Add_dynamic_section_for_html_images branch May 29, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants