I am using RSS2HTML from http://www.feedforall.com/ and the defined name ItemDescription from the RSS is being returned to me with carriage returns which need to be removed and " in it that I need to replace with \" so that I can view the RSS in a menu script that I am using to display the RSS.

ItemDescription pure responce is this:
<!-- HTML generated from an RSS Feed by rss2html.php, http://www.FeedForAll.com/ a NotePage, Inc. product (http://www.notepage.com/) --> <a href="ignore information here it is correct">
<img src="ignore information here it is correct" alt="ignore information here it is correct" border="0" hspace="10" vspace="10" align="left">
</a>
more text

Carriage return is after correct">, align="left">, and after </a>,
need to change the " laced in the <a href""> and all " in <img> to /"

This is what I want it modified to look like:

Quote:
<!-- HTML generated from an RSS Feed by rss2html.php, http://www.FeedForAll.com/ a NotePage, Inc. product (http://www.notepage.com/) --> <a href=/"ignore information here it is correct/"><img src=/"ignore information here it is correct/" alt=/"ignore information here it is correct/" border=/"0/" hspace=/"10/" vspace=/"10/" align=/"left/"></a>more text

I have tried Example 6 & Example 4 from http://www.feedforall.com/forum/viewtopic.php?t=3177&highlight=reformat+itemdescription with no luck

and also tried the following with no luck

document.write("<P class=\"rssNews\"> ~BeginItemsRecord~<?php
// Set initial values for our variables
$newDescription = "~ItemDescription~";

$new_text = trim( preg_replace( '/\n\r|\r\n/', '', $newDescription ) );
$new_string = trim( preg_replace( '"', '/\"', $new_text ) );

echo "$new_text";
echo "$new_string";
?>~EndItemsRecord~ </P>");

See it @ http://www.shopjaycounty.com/RSSFEEDTEST/

Any help is appriciated

    If you truly want backslashes (such as to be usable within a JavaScript command), you could do:

    echo addslashes(preg_replace('/[\r\n]+/', ' ', $text));
    
      Write a Reply...