Results 1 to 5 of 5

Thread: HTML characters being shown in pausing RSS scroller

  1. #1
    Join Date
    Dec 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default RSS Pause Scroller displays information incorrectly

    Script: RSS Pause Scoller

    http://www.dynamicdrive.com/dynamici...ller/index.htm

    I tried installing the demo on my site at www.darlindolphins.com/rss.htm, but the news item descriptions contain extraneous "<a" and "<p" and "srce=" and other html. If I change the rss to BBC instead of CNN, it seems to work OK. I'd rather display domestic news stories instead of British ones, however.
    Last edited by sdasevne; 12-19-2006 at 11:10 PM. Reason: corrected url

  2. #2
    Join Date
    Dec 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I even tried running the demo page at 2 different hosts, and they behave the same way; they display the html code after the description. Is there any way to make the script stop generating code after it reaches the end of the news item? Like just display "read the full story for details" and then stop writing stuff like this: <p><a href="http://rss.cnn.com/~a/rss/cnn_topstories?a=ZPOmyC"><img src="http://rss.cnn.com/~a/rss/cnn_topstories?i=ZPOmyC" border="0"></img></a></p><img src="http://rss.cnn.com/~r/rss/cnn_topstories/~4/63217831"/>

    Please take a look at www.darlindolphins.com/rss.htm to see what I mean. I made no changes to any of the files, just loaded them to my host, and the CNN items look awful.

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Firstly, please note that I've moved your posts into a new thread. You were replying to someone else's thread, which you shouldn't do if you're asking a question of your own.

    Hmm I can't tell immediately why the script is displaying the HTML tags literally for the description portion of the CNN feed. To get the script to just display "read the full story for details" for the descriptions, change the line:

    Code:
    var description='<div class="rssdescription">'+unescape(rsscontent.description)+'</div>'
    inside rsspausescroller.js to:

    Code:
    var description='<div class="rssdescription">read the full story for details</div>'
    I'll have to go back and confirm if the HTML literals problem occurs in the DD demo as well.

  4. #4
    Join Date
    Dec 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I tried truncating the description before the first "<p>", but that didn't help. I added these statements:

    var ix = description.indexOf("<p>");
    if (ix >= 30) description = description.substring(0,ix-1);

    Does anyone else have any suggestions on why the first rss box (CNN) displays the unwanted html, while the second box (BBC) seems to work OK? Has anyone successfully implemented this script using CNN feed, with the "description + date" option?

    Thanks.
    Last edited by sdasevne; 12-19-2006 at 11:15 PM. Reason: spelling error

  5. #5
    Join Date
    Dec 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default RSS Pause Scroller does not handle CNN correctly

    It appears that the RSS Pause Scroller script does not handle the CNN feed correctly. If you look at the sample page at www.darlindolphins.com/rss.htm, showing a CNN scrolling box, a BBC scrolling box, and a Fox scrolling box, you will see that the Fox and BBC feeds look OK, but the CNN feed shows the html characters. Probably CNN is using a different standard than the other two. The solution to my problem is to change from the CNN feed to FOX. The documentation for this script should be updated to indicate that CNN RSS feeds will not work correctly if the "description+date" option is used.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •