Submit Your Article Forum Rules

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: RSS Problem

  1. #1
    WebProWorld MVP edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan's Avatar
    Join Date
    Aug 2003
    Posts
    909

    Question RSS Problem

    Hi

    I hope this is the right place to ask this question.

    I am creating a RSS feed for my video site but encounter a problem to display RSS feed when there is a & (ampersand) on the title page. The RSS feed will not display and checking on the problem, it say error due to whitespace.

    Does anyone has any idea how to overcome this problem?

    I did a test by typing & in the title page instead of just & and it works. But unfortunately I will not be able to control others from just typing & instead of & so wondering if anyone has a solution for this RSS feed problem.
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | ClickBank Pay Check | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  2. #2

    Re: RSS Problem

    you have to filter your users input before you save it

    in cold fusion you use <cfset input = replace(input,'&','&amp;','all')>

    php, asp, etc all have similar functions

    HTH
    -Webmaster Wes | Don't go and misunderestimate me!
    Graphic Design Jobs | Web Design | Ninja Freelance | Ancient Ninja Wisdom

  3. #3
    Senior Member imvain2 has a spectacular aura about imvain2 has a spectacular aura about
    Join Date
    Apr 2004
    Posts
    391

    Re: RSS Problem

    I agree with freelanddesigners.com

    This is only an issue when generating the rss feed. So in your rss feed generating script just replace the & with &amp;

    PHP:
    $Title = str_replace("&", "&amp;", $Title);

  4. #4
    Junior Member hyperdog is an unknown quantity at this point
    Join Date
    Jun 2005
    Posts
    20

    Re: RSS Problem

    If it isn't your site, you could run it through Yahoo pipes, perhaps. The code solutions - and staying on your site - are much better though.

  5. #5
    Senior Member thindenim will become famous soon enough thindenim's Avatar
    Join Date
    Jan 2007
    Posts
    257

    Re: RSS Problem

    I had some problems with this before. There is an html_entities function in PHP, which is supposed to help, but I found it was still causing me problems. Ended up writing the following function, which covers just about everything I think! Overkill for ampersand obviously, but you may have problems with other special characters down the line.

    Of course this will be no use if you are not using PHP!

    Edit: Function uploaded to http://www.tdserver.co.uk/xml_rewrite.txt

    Hope this helps!
    Girlz Night - professional hair and beauty products
    Web design glasgow - from Thin Denim

  6. #6
    WebProWorld MVP TrafficProducer is a name known to all TrafficProducer is a name known to all TrafficProducer is a name known to all TrafficProducer is a name known to all TrafficProducer is a name known to all TrafficProducer is a name known to all TrafficProducer's Avatar
    Join Date
    Jul 2003
    Posts
    1,916

    Re: RSS Problem

    I use:-


    RSS Builder --- free ---
    RSS Builder is an easy to use program to create RSS news feeds and podcasts for your web site. It provides a simple interface that lets you add topics, links, content, and enclosures, then publish the RSS (v2.0) feed to your web server, using the built-in FTP client.



    (The HTML edite option, displays/edit WYSIWYG)

    Nar You. Information. Research. News. Publish your own RSS Feed FREE Webpage at Nar You. Information. Research. News.

  7. #7

    Re: RSS Problem

    We had exactly the same problem. Replacing the ampersand with %26 fixed it.

  8. #8
    WebProWorld MVP edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan's Avatar
    Join Date
    Aug 2003
    Posts
    909

    Smile Re: RSS Problem

    Hi

    Thank you all for your suggestion. I will try them and see which one helps to resolve my issue.

    As my RSS Feed for my site is random, is there a way to update the database for all existing & with &amp; ?

    Thanks for all your kindest suggestion.
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | ClickBank Pay Check | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  9. #9
    Moderator wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,136

    Re: RSS Problem

    The problem with running something on your database is that if the data is used in other parts of your site, other apps might break. If possible, I would recommend editing the script that displays the RSS file to the viewer to replace the ampersands.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  10. #10
    WebProWorld MVP edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan is a splendid one to behold edhan's Avatar
    Join Date
    Aug 2003
    Posts
    909

    Thumbs up Re: RSS Problem

    Hi

    I have tested as all suggested and found suggestion by imvain2 on this works perfectly!

    PHP:
    $Title = str_replace("&", "&amp;", $Title);

    I used thindenim method but it scrambled up the RSS feed though it works too.

    Yes, I do agree with wige as it is best to do that.

    Thanks a million for all your help that I have resolved this issue.
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | ClickBank Pay Check | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Similar Threads

  1. Another IE/CSS div problem I am sure someone here can fix.
    By MeanSEO in forum Graphics & Design Discussion Forum
    Replies: 19
    Last Post: 07-27-2006, 10:29 PM
  2. USB problem
    By jazzyjoe in forum The Castle Breakroom (General: Any Topic)
    Replies: 0
    Last Post: 07-26-2006, 06:23 PM
  3. What's the Problem?
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 03-08-2005, 06:39 PM
  4. CSS Problem
    By MrLeN in forum Web Programming Discussion Forum
    Replies: 8
    Last Post: 01-06-2004, 01:58 PM

Posting Permissions

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