Okay...
I added the following regexp in one of my module files:
my $in = shift;
$in =~ s,<(.*?)>,\<\;$1\>\;,gs;
$in =~ s/\n/<br>/g;
$in =~ s/\n\n/<p>/g;
Now, this works as it should in terms of adding and editing posts.
The problem is when viewing posts, the HTML codes show up, of course, so I use the following codes in another sub for viewing posts:
$in =~ s,<(.*?)>,\<\;$1\>\;,gs;
This works, however, line break <br> and paragraph break <p> only show up as HTML codes, and the spacing is lost.
Any advice is welcome.
Thanks in advance.
========================================
Buh Bye!
Cheers,
Me
I added the following regexp in one of my module files:
Quote:
my $in = shift;
$in =~ s,<(.*?)>,\<\;$1\>\;,gs;
$in =~ s/\n/<br>/g;
$in =~ s/\n\n/<p>/g;
Now, this works as it should in terms of adding and editing posts.
The problem is when viewing posts, the HTML codes show up, of course, so I use the following codes in another sub for viewing posts:
Quote:
$in =~ s,<(.*?)>,\<\;$1\>\;,gs;
This works, however, line break <br> and paragraph break <p> only show up as HTML codes, and the spacing is lost.
Any advice is welcome.
Thanks in advance.
========================================
Buh Bye!
Cheers,
Me