MyBB Community Forums

Full Version: contact form not stripping html code in emails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I use the default mybb contact form. when a user submits a contact form and it emails me, it doesn't strip the <br /> from the email. here's a recent email I was sent from the contact form:

E-mail: [email protected]
Forum profile: username
IP Address: 127.0.0.1
Message:
Hello,<br />
<br />
I just created a profile a few minutes ago and was wondering if i could change my username?<br />
<br />
Will i have to delete and then re-create?<br />
<br />
Thanks!<br />
<br />
Me
I can't reproduce.

1. Are you using 1.8.5?
2. Do you have any modified core files? If yes, which?
3. What was the exact input you entered in textarea?
(2015-06-14, 01:55 AM)Destroy666 Wrote: [ -> ]I can't reproduce.

1. Are you using 1.8.5?
2. Do you have any modified core files? If yes, which?
3. What was the exact input you entered in textarea?


1- 1.8.5

2- only to bypass the registration agreement. changes to member.php:

from
if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post")

to
if(!isset($mybb->settings['reg_agreement'])  && $mybb->request_method != "post")

3- this is a form someone submitted. I'll test myself and report back.

I did a test contact form..I just hit enter after each word in the message area:

E-mail: [email protected]
Forum profile: andrewjs18
IP Address: 0.0.0.0
Message:
Let's<br />
see<br />
if<br />
I<br />
can<br />
break<br />
this!<br />
<br />
thanks,<br />
<br />
Andrew
any movement on this?
this isn't parsing an ampersand either:

E-mail: [email protected]
Forum profile: N/A
IP Address: 0.0.0.0
Message:
Not sure what my usérname is&amp; I need a new password<br />
<br />
<br />
TIA
The parser does insert these tags indeed (https://github.com/mybb/mybb/blob/featur...t.php#L217).
The characters are escaped too because these e-mails were presumably intended to be sent as HTML, but aren't - the default type is defined as text, not text/html: https://github.com/mybb/mybb/blob/featur...s.php#L527, which could be overridden here: https://github.com/mybb/mybb/blob/featur...t.php#L230.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2107

Thanks for contributing to MyBB!

Regards,
The MyBB Group
(2016-06-17, 12:03 PM)boson Wrote: [ -> ]any fix ? http://community.mybb.com/thread-194309.html

There has not been a fixed created and tested for this issue yet.
(2016-06-17, 12:33 PM)Ben C Wrote: [ -> ]
(2016-06-17, 12:03 PM)boson Wrote: [ -> ]any fix ? http://community.mybb.com/thread-194309.html

There has not been a fixed created and tested for this issue yet.

but i need some immediate fix . you got any ? thanks

waiting for this
Pages: 1 2