That would be very nice to know...
Thanks, Matt.
Edit: I actually had a typo in the title of topic :|
Edited by Friiks, 06 February 2007 - 01:14 PM.
Posted 06 February 2007 - 12:24 PM
Edited by Friiks, 06 February 2007 - 01:14 PM.
Posted 06 February 2007 - 01:05 PM
Posted 06 February 2007 - 07:56 PM
Posted 06 February 2007 - 08:47 PM
Posted 07 February 2007 - 12:20 PM
strip_tags($message, '<span>,<p>,<font>,<b>,<s>')this, where tags after the comma are tags which are allowed.. ?
Posted 07 February 2007 - 12:41 PM
strip_tags($message, '<span><p><font><b><s>');
Posted 07 February 2007 - 01:31 PM
Posted 07 February 2007 - 05:55 PM
<?php
function html2txt($document){
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
);
$text = preg_replace($search, '', $document);
return $text;
}
?>
This will strip out all javascript, style, HTML and comments (Such as <!-- -->)Posted 07 February 2007 - 09:27 PM
Demonslay, on Feb 6 2007, 09:47 PM, said:
Posted 08 February 2007 - 04:21 PM
$message=mysql_real_escape_string(htmlspecialchars($_POST['message'])); $message=strip_tags($message,'<b><i><s><a><hr><img><ul><ol><li>');
Posted 08 February 2007 - 08:00 PM
Posted 09 February 2007 - 06:29 AM
0 members, 1 guests, 0 anonymous users