SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: bangis on December 05, 2009, 07:00:48 PM

Title: Shoutbox problems : Email address will break the SP shoutbox
Post by: bangis on December 05, 2009, 07:00:48 PM
Hi,

I have a programmer resolve a problem for me.  I just wanted to report that there is an incompatibility with SMF 2 Curve theme in the Subs.php file.  I am using Simple Portal 2.3.1.

If you type an email address to the shoutbox, it will break the whole site.  I have seen this in several of my install.  This is the reason probably why your shoutbox is down as of the moment. 

Since I was happy with Simple Portal, I would like to offer the fix which works for me.  In the Subs.php file, look for this


// Next, emails...
               if (!isset($disabled['email']) && strpos($data, '@') !== false)
               {

Then the following batch of code,  please comment it like below:

                  //$data = preg_replace('~(?<=[\?\s' . $non_breaking_space . '\[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s' . $non_breaking_space . '\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;|\.(?:\.|;|&nbsp;|\s|$|<br />))~' . ($context['utf8'] ? 'u' : ''), '$1', $data);

The following code to the code you commented is already addressing the special character problem.  The commented code seems to double up the process so you need to comment it.

If your Shoutbox is not broken if you put an email address in it, then you don't need this.  I am not suggesting this is an official fix.  I am offering this to Simple Portal so they know about this incompatibility with SMF 2.

Hope this helps.


Bangis
                  
Title: Re: Shoutbox problems : Email address will break the SP shoutbox
Post by: Robbo on December 05, 2009, 11:04:08 PM
test@email.com

Edit: Seems to work fine in the board. Weird how it only breaks in the shoutbox.

This issue is being looked into btw.
Title: Re: Shoutbox problems : Email address will break the SP shoutbox
Post by: Stigmartyr on January 20, 2010, 09:03:32 PM
Using a Curve based theme and I confirmed that it hung the page load where shoutbox appeared.  Using his simple fix above I was able to side-step the issue.

Very grateful for that, I would have never guessed!
Title: Re: Shoutbox problems : Email address will break the SP shoutbox
Post by: [SiNaN] on January 23, 2010, 01:49:08 PM
That will brake auto-linking feature for e-mails all over the forum. Proper fix is here:

http://simpleportal.net/index.php?topic=4126.msg26219#msg26219
SimplePortal 2.3.8 © 2008-2024, SimplePortal