feed.php: make sure we do htmlspecialchars on most to-be-xml content

This commit is contained in:
Leho Kraav 2010-12-26 16:24:20 +02:00 committed by Andrew McMillan
parent 2ebaecd3e3
commit 37cf2f618d

View File

@ -20,7 +20,7 @@ $request = new CalDAVRequest();
* Source: http://stackoverflow.com/questions/1960461/convert-plain-text-hyperlinks-into-html-hyperlinks-in-php
*/
function hyperlink( $text ) {
return preg_replace( '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '<a href="$1" target="_blank">$1</a>', $text );
return preg_replace( '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '<a href="$1" target="_blank">$1</a>', htmlspecialchars($text) );
}
function caldav_get_feed( $request ) {