|
#1
|
|||
|
|||
|
Pixelpost RSS-feed not showing links: possible solution
I had the problem that my RSS feed wasn't showing any clickable links (as seen through Feedreader) and that - if I used html for the make up - there was no structure/make-up whatsoever in the text you give in in the 'image description/text' box.
Now I did the following (and that seems to solve the no clickable links and the disappeard html make-up problems) In the index.php file I changed Code:
$body = pullout($body);
$body = stripslashes($body);
$body = ereg_replace("\n","\n<br />",$body);
$body = strip_tags( $body );
$body = htmlspecialchars($body,ENT_QUOTES);
Code:
$body = pullout($body);
$body = ereg_replace("\n","\n<br />",$body);
$body = htmlspecialchars($body,ENT_QUOTES);
The two 'statements' I removed are: Code:
$body = stripslashes($body); $body = strip_tags( $body );
__________________
http://www.iphimeda.be |
|
#2
|
|||
|
|||
|
this is an interesting approach and on fast hand I see 3 points:
1) you replaced some characters by ereg_replace, but stripslashes() could strip also slashes which you don't think of in the moment 2) strip_tags() is used to remove any HTML-tags (you want to keep the links) 3) did you validate your result with any feedvalidator? did you check all possible combinations? the RSS-format has strict rules, so we tried to keep as conform as possible, the result is that our feeds validate if you want other things, why not? there is always more than one way to happiness but our aim is also to stay strictly validating and rules-compliant |
|
#3
|
|||
|
|||
|
As for point 3, feedvalidator.org says it's a valid RSS feed
__________________
http://www.iphimeda.be |
|
#4
|
||||
|
||||
|
It should be enough to change:
PHP Code:
PHP Code:
|
|
#5
|
|||
|
|||
|
It would continue stripping the
Code:
<br></br> Code:
<p></p>
__________________
http://www.iphimeda.be |
|
#6
|
|||
|
|||
|
yes, the parameter "a" tells not to unstrip the anchor-tags but to strip all of the other tags
there is the chance to add more "allowed parameters" to this step what will be stripped might depend on the PHP-version |
| Post Reply |
| Thread Tools | |
|
|