Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 10:47 am EST

Geeklog Forums

Content syndication & valide XML


Status: offline

xxl

Forum User
Newbie
Registered: 04/04/08
Posts: 1
Location:Germany
stressed
Hi!

I use geeklog over 2 years. I never tested the validity of resulting "RSS" files. Validome says "not valid" or stops after a XML parsing error. You get this if you put html tags in article content. (It's normal: DTD / XMLS not allow other tags. An opened tag is not good for a vaild xml...) I found this out using mixano.de.

So I try to make it clean:

In /system/classes/syndication/feedparserbase.class.php in line 224 I have changed
Text Formatted Code

return htmlspecialchars($string);
 

in
Text Formatted Code

return htmlspecialchars(strip_tags($string));
 

So this function should looks like this:
Text Formatted Code

function _safeXML( $string )
    {
      return htmlspecialchars(strip_tags($string));
    }
 


Now it looks good. Test youre RSS'es in validome...

What do you think about?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Are you using RSS 2.0? Those should validate just fine out of the box.

Also, what does http://www.feedvalidator.org/ say about your feeds? The RSS 2.0 feed for geeklog.net validates just fine there.

bye, Dirk
 Quote

All times are EST. The time is now 10:47 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content