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

Content filter to prevent mail text from being stripped #61

Open
nicolasguenther opened this issue May 27, 2021 · 10 comments
Open

Content filter to prevent mail text from being stripped #61

nicolasguenther opened this issue May 27, 2021 · 10 comments
Assignees
Labels
bug Something isn't working inactive issue is inactive for a while needs-testing needs some tests

Comments

@nicolasguenther
Copy link

When using mail2most i encounter problems where mail content is stripped when it contains certain combinations of characters which are interpreted as markdown (colon, hyphen, pipe etc.).

I propose a new setting for a profile that enables me to specify certain characters which will be filtered out before posting the text in a mattermost channel.

An alternative would be to start/end escaping using the prefix/suffix settings. But it seems mattermost is lacking support for such an escape block. Using "```" blocks doesn't fix the problem for me.

@c-seeger
Copy link
Contributor

hello @nicolasguenther thank you for opening an issue here. I'll take a look into this.

Is this only a problem with markdown interpreted characters?
Maybe a StripMarkdown analog to StripHTML would be easier instead of a filter list.

@c-seeger c-seeger self-assigned this May 27, 2021
@c-seeger c-seeger added bug Something isn't working needs-testing needs some tests labels May 27, 2021
@nicolasguenther
Copy link
Author

nicolasguenther commented May 27, 2021

Thanks @c-seeger. StripMarkdown looks convenient. I'm not sure it would solve my problem though. The problem occurs especially when the mail body contains colon characters which are used as control characters to enter emojis. I'll prepare and post an example later.

@nicolasguenther
Copy link
Author

Example mail body 1:

test.
test: 123456

Result: Non printable characters are shown in the mattermost channe M�-

Example mail body 2:

test 
test: 123456

Result: Second line is stripped and not displayed in mattermost channel. Note: There is a space character at the end of the first line.

@c-seeger
Copy link
Contributor

c-seeger commented Jun 1, 2021

@nicolasguenther i actually can't reproduce the issue both mail bodys work correctly on the latest build.

@c-seeger c-seeger added the inactive issue is inactive for a while label Jun 22, 2021
@Philmod
Copy link

Philmod commented Sep 28, 2021

Hi,

I also see some text stripped from email, for example this email (in Plain Text Mode in Gmail):

The oncall rotation for ladder 'http://test' has been updated at 2021/09/28
13:30:00-0700:
Oncall until: 2021/10/05 13:30:00-0700

Oncall list (level -> contacts):
Level 1: quidam
Level 2: quidam_bis


May the queries flow and the pagers remain silent.

renders like this in Mattermost:

The oncall rotation for ladder 'http://test' has been updated at 2021/09/28
13:30:00-0700:

Oncall list (level -> contacts):


May the queries flow and the pagers remain silent.

In the mail2most config, we use StripHTML = false and ConvertToMarkdown = false.

It seems like the lines after a :\n go missing?

Any idea how to fix it?

Thanks

@c-seeger
Copy link
Contributor

Thanks @Philmod for bringing this up. Interesting behavior, I'll take a look on this and check if I can reproduce this.

@Philmod
Copy link

Philmod commented Oct 18, 2021

Thanks @Philmod for bringing this up. Interesting behavior, I'll take a look on this and check if I can reproduce this.

Hey @c-seeger, were you able to reproduce this bug?

@Philmod
Copy link

Philmod commented Dec 6, 2021

Hi @c-seeger, any update on this bug?

@Philmod
Copy link

Philmod commented Feb 16, 2022

Hey @c-seeger, any update on this issue?

@c-seeger
Copy link
Contributor

hello @Philmod sorry not atm will take a look as soon as i find some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive issue is inactive for a while needs-testing needs some tests
Projects
None yet
Development

No branches or pull requests

3 participants