James Colannino wrote:
Chris wrote:
Are you sure there are newlines before you run strip_tags?
I would assume so, because everything from the textarea runs together in
one line when displayed in the browser until filtered through nl2br().
That would suggest to me that there are indeed \n's
Chris wrote:
Are you sure there are newlines before you run strip_tags?
I would assume so, because everything from the textarea runs together in
one line when displayed in the browser until filtered through nl2br().
That would suggest to me that there are indeed \n's that are being
converte
James Colannino wrote:
> Chris wrote:
>
>> RTM.
>>
>> Supply the tags you want to keep when you call strip_tags.
>>
>> $stripped = strip_tags($data, '');
>
> I can do that, but my question had to do with strip_tags seeming to get
> rid of \n's, not tags. This is why I was concerned. If I run
>
Chris wrote:
RTM.
Supply the tags you want to keep when you call strip_tags.
$stripped = strip_tags($data, '');
I can do that, but my question had to do with strip_tags seeming to get
rid of \n's, not tags. This is why I was concerned. If I run
strip_tags(), followed by nl2br, the tags
James Colannino wrote:
> Hey everyone,
>
> I have a little bit of a quandry. I need to strip HTML tags from user
> input, but I also need to convert \n's from the textarea elements to
> tags so it will display properly in a browser.
RTM.
Supply the tags you want to keep when you call strip_tag
Hey everyone,
I have a little bit of a quandry. I need to strip HTML tags from user
input, but I also need to convert \n's from the textarea elements to
tags so it will display properly in a browser.
nl2br() works just fine, but if I use strip_tags first, then run nl2br,
nl2br won't work a
6 matches
Mail list logo