mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-20 06:09:32 +00:00
feed.php: make sure we do htmlspecialchars on most to-be-xml content
This commit is contained in:
parent
2ebaecd3e3
commit
37cf2f618d
@ -20,7 +20,7 @@ $request = new CalDAVRequest();
|
|||||||
* Source: http://stackoverflow.com/questions/1960461/convert-plain-text-hyperlinks-into-html-hyperlinks-in-php
|
* Source: http://stackoverflow.com/questions/1960461/convert-plain-text-hyperlinks-into-html-hyperlinks-in-php
|
||||||
*/
|
*/
|
||||||
function hyperlink( $text ) {
|
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 ) {
|
function caldav_get_feed( $request ) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user