Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Black diamonds are back in the RSS feed widget

    Scheduled Pinned Locked Moved webGUI
    10 Posts 3 Posters 2.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KOMK
      KOM
      last edited by

      The funny characters that looks like a question mark inside a black diamond are back in the RSS widget in 2.2-RELEASE.

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        I don't think the cause/fix was ever found in 2.2-RC. The "diamonds" occur when various escape whitespace sequences occur in the posted data that feeds through to the RSS display. It depends on how the original HTML in the blog post/s has been formatted.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • KOMK
          KOM
          last edited by

          Oh, ha.  I remember you saying that you were going to look into it, and then a build or two later they disappeared.  I just assumed that you found the issue and fixed it.  There is no way to sanitize the input to remove these funny escape chars?  2.1.5 never had this issue, and I would assume it's using the same RSS data.

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            I hunted around for a while looking for differences in the 2.2 code that reads and parses the RSS fed content compared to 2.1.5 and nothing stood out. I put a few 2.1.5 PHP files as-is onto a test 2.2-RC system to just see if any would fix it, but I got no joy. It uses /etc/inc/simplepie.inc to do a bunch of RSS feed gathering and parsing.
            I guess something in simplepie combined with a newer PHP version has resulted in different behavior.
            At that point I decided the "diamonds" could stay a "feature" and got on with debugging other widgets.

            If someone else wants to try and track this down, then feel free  :-\

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • KOMK
              KOM
              last edited by

              Thanks for your efforts anyway.  Aren't computers fun?  And by 'fun', I mean "mind-numbingly, hair-tearingly frustrating!!!!"

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                For what its worth:
                https://blog.pfsense.org/ is outputting UTF-8
                The RRS widget using SimplePie, content coding is set to "latin-1".
                Somehow, SimpePie doesn't convert well.

                Open /usr/local/www/widgets/widgets/rss.widget.php
                Change line 160 to
                // $feed->set_output_encoding('latin-1');
                Save.

                Bye bye diamonds  ;)

                Btw: I only tested this with https://blog.pfsense.org/ - other RSS feeds might give 'other' results.

                Extra info:
                The PHP version that pfSense is using right now, 5.5.19, has full 'mbstring' (mb_convert_encoding())support.
                Forcing the output to 'latin-1' doesn't seem to be needed.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • P
                  phil.davis
                  last edited by

                  Thanks, another piece of crud fixed. I made a pull request for that https://github.com/pfsense/pfsense/pull/1465 - and credited you with the fix, hope that is OK.

                  As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                  If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                  1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan
                    last edited by

                    … and it's merged  :)

                    I was actually still trying to 'understand' how SimplePie converts between 'input' and 'output'.

                    But, true, the 'fix' works for me™

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    1 Reply Last reply Reply Quote 0
                    • P
                      phil.davis
                      last edited by

                      @Gertjan:

                      … and it's merged  :)

                      I was actually still trying to 'understand' how SimplePie converts between 'input' and 'output'.

                      But, true, the 'fix' works for me™

                      It works fine for the default pfSense blog feed, so that is the main use of it, I guess.
                      If others set other feeds in there and find a problem they can report it.

                      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                      1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan
                        last edited by

                        Saw this : Widget "Captive Portal Status" small bug ?
                        Another one line visual bug  ;)

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.