MyBB Community Forums
[Pushed] contact form not stripping html code in emails - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Development (https://community.mybb.com/forum-161.html)
+--- Forum: MyBB 1.8 Development (https://community.mybb.com/forum-165.html)
+---- Forum: 1.8 Bugs and Issues (https://community.mybb.com/forum-157.html)
+----- Forum: Pushed (https://community.mybb.com/forum-183.html)
+----- Thread: [Pushed] contact form not stripping html code in emails (/thread-171904.html)

Pages: 1 2


contact form not stripping html code in emails - andrewjs18 - 2015-06-13

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


RE: contact form not stripping html code in emails - Destroy666 - 2015-06-14

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?


RE: contact form not stripping html code in emails - andrewjs18 - 2015-06-14

(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


RE: contact form not stripping html code in emails - andrewjs18 - 2015-06-18

any movement on this?


RE: contact form not stripping html code in emails - andrewjs18 - 2015-06-25

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


RE: contact form not stripping html code in emails - Devilshakerz - 2015-06-25

The parser does insert these tags indeed (https://github.com/mybb/mybb/blob/feature/contact.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/feature/inc/functions.php#L527, which could be overridden here: https://github.com/mybb/mybb/blob/feature/contact.php#L230.


RE: contact form not stripping html code in emails - Jones H - 2015-06-28

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


RE: contact form not stripping html code in emails - boson - 2016-06-17

any fix ? http://community.mybb.com/thread-194309.html


RE: contact form not stripping html code in emails - Ben - 2016-06-17

(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.


RE: contact form not stripping html code in emails - boson - 2016-06-17

(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