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

Issue with "<" character in HTML Notifications not escaped #2866

Open
8rror404 opened this issue Dec 27, 2024 · 5 comments · May be fixed by #2893
Open

Issue with "<" character in HTML Notifications not escaped #2866

8rror404 opened this issue Dec 27, 2024 · 5 comments · May be fixed by #2893
Assignees
Labels
bug Something isn't working Notifications systems Development of notifications of changes

Comments

@8rror404
Copy link

8rror404 commented Dec 27, 2024

Describe the bug

It appears the < character is not escaped in HTML notifications.
The < character does not show and causes problems after it.

Version
v0.48.05

How did you install?

Docker

To Reproduce

Steps to reproduce the behavior:

  1. Set notification to HTMLcolor and set an email notification
  2. Set notification body to {{diff_full}}
  3. changes on https://changedetection.io/CHANGELOG.txt do not show the < character and truncate after it.

on the notification:

0.47.00
The line "Visual Selector - Including <button> (#2686)" becomes - "Visual Selector - Including (#2686)"

0.46.00
The notification is truncated after - UI - Extract it cannot cope with <title>
No further lines are included in the notification.

Expected behavior
The notification body should show the whole {{diff_full}}

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Email application: Outlook
Email account: gmail

@dgtlmoon dgtlmoon added the Notifications systems Development of notifications of changes label Dec 27, 2024
@dgtlmoon
Copy link
Owner

wow thanks for this, can you test if its the same with HTML format and HTML color format?

@8rror404
Copy link
Author

Hi
I have just tested with HTML as requested. The result is the same.

Looking at the HTML source of the notification email, in the example given, the whole of CHANGELOG.txt is contained in the email, but Outlook renders the code. Copy/pasting the HTML from the notification email into chrome/firefox highlights the problem.

This may only be a problem where the web page contains a .txt file and {{diff_full}} converts to HTML?

@8rror404
Copy link
Author

I have further tested Markdown format with the same result.
Where the web page is a .txt file, it appears that only Text format notifications display correctly in the notification email.

dgtlmoon added a commit that referenced this issue Jan 9, 2025
…scaped - except for our added/remove/changed markup
@dgtlmoon dgtlmoon added bug Something isn't working and removed triage labels Jan 9, 2025
@dgtlmoon
Copy link
Owner

dgtlmoon commented Jan 9, 2025

Ok hmm

I have further tested Markdown format with the same result.

I'm not sure what todo about the markdown format, whats the expectation here, that cdio will convert the markdown to HTML, and then send the diff?

@8rror404
Copy link
Author

8rror404 commented Jan 9, 2025

I'm not sure what todo about the markdown format, whats the expectation here, that cdio will convert the markdown to HTML, and then send the diff?

Many thanks for the work done on HTML format notifications. I don't really have any expectations regarding Markdown format, I am not using it at all, and the issue has not come up before.

It was only the change to HTML Color which is perfect for my needs (and now the default format) that was causing real life problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Notifications systems Development of notifications of changes
Projects
None yet
2 participants