[Pmwiki-users] rss-feed

Philipp Hügelmeyer phuegelm
Fri Dec 31 01:05:09 CST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I use pmwiki-2.0-beta14 and the rss functionality did not produce 
corect xml. So I changed the fuinction rssencode() in scripts/rss.php. 
It now looks a bit ugly but at least it works for me. I am not shure, 
that it cares of all the markup and corner cases.


  2.0-beta14:

function rssencode($s)
   {return  preg_replace('/([\\x80-\\xff])/e',"'&#'.ord('\$1').';'",$s); 
}


modified:

function rssencode($s)
   {$s= preg_replace('/([\\x80-\\xff])/e',"'&#'.ord('\$1').';'",$s);
    $s= preg_replace('/&((.*)quo|(.*)dot);/'," ",$s);
    return preg_replace('/&(nbsp|#160);/e'," ",$s); }


Perhaps someone could find a a nicer regular expression.

Philipp Huegelmeyer <phuegelm at uos.de>      Universitaet Osnabrueck
Tel: 0541-969-6510                          (Buero)Zentrum VirtUOS
Fax: 0541-969-16511                       Schlossstrasse 9 D-49069
- - ------------------------------------------------------------------
pgp-fingerprint: D008 BB2B 0B48 80EC CDF0 CBF0 D665 8CFF 63D9 DF8A
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB1Qgb1mWM/2PZ34oRAtH5AJ0SKbgSs6ePQ5i/7XYw01RuU66dbgCdHH3U
YgCxlr1RBQBc1PgnaE6UsBc=
=MYjv
- -----END PGP SIGNATURE-----


Philipp Huegelmeyer <phuegelm at uos.de>      Universitaet Osnabrueck
Tel: 0541-969-6510                          (Buero)Zentrum VirtUOS
Fax: 0541-969-16511                       Schlossstrasse 9 D-49069
- ------------------------------------------------------------------
pgp-fingerprint: D008 BB2B 0B48 80EC CDF0 CBF0 D665 8CFF 63D9 DF8A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB1Qgm1mWM/2PZ34oRApg/AJ9uDKEFudWcfTKa8MnCvHPOQaI2GACfVnTm
uRJ+eKH6tWbYBpgwXJj5NdE=
=KMt7
-----END PGP SIGNATURE-----




More information about the pmwiki-users mailing list