[Comoblog-commit] comoblog/include libraries.inc.php,1.4,1.5
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2005-12-01 14:58:05
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9398/comoblog/include Modified Files: libraries.inc.php Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons POSSIBLE UPDATES add filter to only allow certain tags TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- Index: libraries.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/libraries.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- libraries.inc.php 25 Nov 2005 02:07:11 -0000 1.4 +++ libraries.inc.php 1 Dec 2005 14:57:55 -0000 1.5 @@ -296,8 +296,16 @@ function comment_add ($comment) { $comment['comment_author'] = clean_up_txt($comment['comment_author']); $comment['comment_author_email'] = clean_up_txt($comment['comment_author_email']); - $comment['comment_text'] = clean_up_txt($comment['comment_text']); + #$comment['comment_text'] = clean_up_txt($comment['comment_text']); + // optionally allow raw HTML to be entered into comments + // needs an additional filter to stip script tags etc? + if ($comment['comment_convert'] != 'noconvert'){ + $comment['comment_text'] = clean_up_txt($comment['comment_text']); + } + + + // apply comment filters global $COMMENT_FILTERS; if (count($COMMENT_FILTERS) > 0) { |