JNameNotTaken
Programmer
Hello All
New problem today. Any help would be great, thanks.
I have a form that takes text from a user in a Text Area and sends it as part of the body of a html mail.
Firstly, I replace all the \n's with <BR>'s on the text from the text area as so:
All is well.
However if a user enters a html tag e.g. <object> in the text, the rendered email stops right there before the <. i.e. characters are missing.
I can only assume it's because a corresponding </object> or whatever tag is expected. If I manually provide a corresponding closing tag it resolves the issue but obviously the text "<object>" is missing.
Is their any easy way to fix this? I looked into URI::Escape; but it adds padding for spaces and stuff like that which is not what I need.
Any ideas how to escape html from the mail?
Oh, and putting <code> </code> tags around the text did not work for some reason. Perhaps the email recipient renderer does not recognize the code tag? (no idea!)
Thanks Very Much
New problem today. Any help would be great, thanks.
I have a form that takes text from a user in a Text Area and sends it as part of the body of a html mail.
Firstly, I replace all the \n's with <BR>'s on the text from the text area as so:
Code:
$detailsBR = $details;
$detailsBR =~ s/\n/<BR>/g;
However if a user enters a html tag e.g. <object> in the text, the rendered email stops right there before the <. i.e. characters are missing.
I can only assume it's because a corresponding </object> or whatever tag is expected. If I manually provide a corresponding closing tag it resolves the issue but obviously the text "<object>" is missing.
Is their any easy way to fix this? I looked into URI::Escape; but it adds padding for spaces and stuff like that which is not what I need.
Any ideas how to escape html from the mail?
Oh, and putting <code> </code> tags around the text did not work for some reason. Perhaps the email recipient renderer does not recognize the code tag? (no idea!)
Thanks Very Much