#3566 Hide HTML comments in issues from email notifications
Opened 5 years ago by jflory7. Modified 5 years ago

Summary

Don't show HTML comments in email notifications for new Pagure issue comments

Background

This issue mostly affects projects that use an issue template. Issue templates may contain HTML comments (e.g. <!-- Hello world! -->) with instructions or advice for someone filing an issue. These are helpful for someone filing an issue, but shouldn't show in the Pagure issue. Of course, they don't display, but the data is still "there" in the Pagure comment.

In email notifications, the HTML comments are shown instead of omitted. This makes email notifications more difficult to read if there are many comments in an issue template, and the reporter does not delete them.

Details

Possible implementation idea is to run a check on email messages for HTML comments and strip them out if present? It's difficult to suggest an implementation because I'm not sure how email notifications are done now.

Outcome

Easier to follow along via email with activity in a project that uses comments in issue templates (less boilerplate, more meaningful text)


Could you point me to such a project?

I have the feeling we may not be able to fix this, we're sending what the user post, so if there is content the users should remove, then they should remove it I believe.

Could you point me to such a project?

One example is the fedora-womens-day issue tracker. See filing a new issue to see how the template is written. I was also hoping to do this for other projects as well.

@pingou :

we're sending what the user post

And there's an argument to be made for that, but since the content is being sent in a different format, there's also an argument for conforming it to that format.

When "what the user posts" contains HTML comments, those will only be visible in the email — they won't be visible to anyone viewing the post on the web. That's sort of the entire point of using HTML comments to provide instructional notes in the pre-filled text: to keep that text out of the visible content, even if the user leaves it in.

So, stripping those HTML comments out of the emailed copy, so that it matches the content visible on the web — rather than putting the onus on the poster to remove them — would seem to follow the principle of least surprise. That's my take, anyway.

Login to comment on this ticket.

Metadata