Skip to content

HtmlToMarkdownParser: Clean attributes for more tags

What does this MR do and why?

Previously, we've removed attributes (except for src and alt) only for the <img> tag.

Now, we are removing for all tags (<em>, <strong>, <details>) we convert to markdown to.

This PR is continuation for this one - !109811 (merged)

Note that this functionality is still behind feature flag. See [Feature flag] Rollout `service_desk_html_to_te... (#389822 - closed).

Screenshots or screen recordings

Before Now
Screenshot_2023-02-22_at_13.49.10 Screenshot_2023-02-22_at_13.49.24

How to set up and validate locally

  1. Download MIRO email example: miro_board.eml
  2. Update email with your projects email in Service Desk. This one eyero-ext+flightjs-flight-7-issue-@gitlab.com
  3. Start local env: gdk start
  4. Run bin/mail_room start
  5. Run spring rails c in gitlab directory.

Then in console:

raw = File.open("miro_board.eml").read
::ServiceDeskEmailReceiverWorker.new.perform(raw)

Go to the project issues and open newly created issue.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #372301 (closed)

Edited by Peter Leitzen

Merge request reports