so I made minor modifications to the contentpart core:
include/inc_front/content/cnt18.article.inc.php
The following changes enable strings to be converted to working url links:
http://www.mydomain.com
http://www.mydomain.com
(as shown above)
- they open in a blank window
lines 95-97 (two new lines)
Code: Select all
$guestbook['post']['msg'] = preg_replace("'(\w+)://([\w\+\-\@\=\?\.\%\/\:\&\;~\|]+)(\.)?'", "<a href=\"\\1://\\2\" target=\"blank\">\\1://\\2</a>", $_POST['guestbook_msg']);
$guestbook['post']['msg'] = preg_replace("'(\w\s+)www\.([\w\+\-\@\=\?\.\%\/\:\&\;~\|]+)(\.\s|\s)'", "\\1<a href=\"http://www.\\2\" target=\"blank\">www.\\2</a>\\3" , $guestbook['post']['msg']);
$guestbook['post']['msg'] = trim(remove_unsecure_rptags($guestbook['post']['msg']));
Code: Select all
$guestbook['row']['guestbook_msg'] = html_despecialchars($guestbook['row']['guestbook_msg']);