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

Respect HTML line breaks #55

Closed
LDannijs opened this issue Feb 17, 2025 · 3 comments · Fixed by #56
Closed

Respect HTML line breaks #55

LDannijs opened this issue Feb 17, 2025 · 3 comments · Fixed by #56

Comments

@LDannijs
Copy link

Hello again :)

I'm using Feedcord to pass my Synology notifications (mostly for hyper backup) from it to my Discord. To do that I'm using https://kill-the-newsletter.com. Now the text does appear correctly, however it does not seem to use the line breaks that are embedded into the html. Here is the feed from kill the newsletter:

<?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <id>urn:kill-the-newsletter:secret</id>
      <link
        rel="self"
        href="https://kill-the-newsletter.com/feeds/secret.xml"
      />
      <link
        rel="hub"
        href="https://kill-the-newsletter.com/feeds/secret/websub"
      />
      <icon
            >https://gmail.com/favicon.ico</icon
          >
      <updated
        >2025-02-15T02:08:01.789Z</updated
      >
      <title>dsm</title>
      
          <entry>
            <id>urn:kill-the-newsletter:</id>
            <link
              rel="alternate"
              type="text/html"
              href="https://kill-the-newsletter.com/feeds/secret/entries/secret.html"
            />
            
            <published>2025-02-15T02:08:01.789Z</published>
            <updated>2025-02-15T02:08:01.789Z</updated>
            <author>
              <name>[email protected]</name>
              <email
                >[email protected]</email
              >
            </author>
            <title>[ip] NAS Network backup - Backup NAS successful on NAS</title>
            <content type="html">
              Your backup task Backup NAS is now complete.&lt;br&gt;&lt;br&gt;Backup Task: Backup NAS&lt;br&gt;Backup Destination: ip / Backup / NAS-HD_1.hbk&lt;br&gt;Start Time: Sat, Feb 15 2025 03:00:03&lt;br&gt;Duration: 1 minute 27 seconds &lt;br&gt;&lt;br&gt;Total Source Size:&lt;br&gt;- Shared folder: 215.0 GB&lt;br&gt;- Application: 58.0 KB&lt;br&gt;- Metadata: 3.0 KB&lt;br&gt;Increased Target Size: 12.6 MB&lt;br&gt;New Shared Folder Data Size: 9.7 MB&lt;br&gt;Modified Shared Folder Data Size: 347.0 KB&lt;br&gt;Deleted Shared Folder Data Size: 0.0 KB&lt;br&gt;Modified Application Data Size: 58.0 KB&lt;br&gt;&lt;br&gt;From NAS&lt;br&gt;&lt;br&gt;&lt;br&gt;

              
                &lt;hr /&gt;
                &lt;p&gt;
                  &lt;small&gt;
                    &lt;a
                      href=&quot;https://kill-the-newsletter.com/feeds/secret;
                      &gt;Kill the Newsletter! feed settings&lt;/a
                    &gt;
                  &lt;/small&gt;
                &lt;/p&gt;
              
            </content>
          </entry>

As you can see, there are multiple br (html line breaks) spread throughout the content. However, in Discord:

Image

Is this something that can be fixed?

@Qolors
Copy link
Owner

Qolors commented Feb 17, 2025

Hey there :)

Yeah that should be a quick fix

I can bump the patch tonight when I get home

Thanks

@LDannijs
Copy link
Author

You're amazing dude 🙌 Thank you for the rapid replies and fixes.

@Qolors
Copy link
Owner

Qolors commented Feb 18, 2025

I threw the modified decoding method in a scratchpad and it gets the results you want..

Going to close this with the incoming merge for the patch and you can pull the update

And of course! Thanks for bringing up issues - makes it a better tool for everyone :)

Qolors added a commit that referenced this issue Feb 18, 2025
@Qolors Qolors mentioned this issue Feb 18, 2025
@Qolors Qolors closed this as completed in ea2c9ab Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants