after update to 2.1 > comments '<'.removeEvilAttributes('b
Board index / PHP Melody - Video CMS
9 posts • Page 1 of 1
I have the same problem..
-
ciberlinker - Verified Customer
- Posts: 744
- Joined: Mar 22, 2008 4 pm
- Reputation points: 33
Change the comment system to the disqus. no more spam or other issues I've seen here and unsolved.
Here it is a tutorial: http://www.modmyscript.com/add-disqus-o ... elody-2-x/
Here it is a tutorial: http://www.modmyscript.com/add-disqus-o ... elody-2-x/
http://www.ModMyScript.com - PHPMelody plugins and mods since 2008
http://www.HostingWays.com - Shared or VPS Hosting
*** PHP Melody user and plugins maker for 9 years and counting.
http://www.HostingWays.com - Shared or VPS Hosting
*** PHP Melody user and plugins maker for 9 years and counting.
-
muzikia - Verified Customer
- Posts: 4120
- Joined: Mar 24, 2008 6 am
- Location: ModMyScript.com - PHPMELODY mods
- Reputation points: 167
muzikia wrote:Change the comment system to the disqus. no more spam or other issues I've seen here and unsolved.
Here it is a tutorial: http://www.modmyscript.com/add-disqus-o ... elody-2-x/
Muzikia the problem is not only in the comments ..
a greeting
-
ciberlinker - Verified Customer
- Posts: 744
- Joined: Mar 22, 2008 4 pm
- Reputation points: 33
check it here
viewtopic.php?p=60530&f=6#p60530
viewtopic.php?p=60530&f=6#p60530
http://www.ModMyScript.com - PHPMelody plugins and mods since 2008
http://www.HostingWays.com - Shared or VPS Hosting
*** PHP Melody user and plugins maker for 9 years and counting.
http://www.HostingWays.com - Shared or VPS Hosting
*** PHP Melody user and plugins maker for 9 years and counting.
-
muzikia - Verified Customer
- Posts: 4120
- Joined: Mar 24, 2008 6 am
- Location: ModMyScript.com - PHPMELODY mods
- Reputation points: 167
Solution
In /include/functions.php FIND
REPLACE WITH
Note: this will only fix new comments, the ones that are broken will remain broken
In /include/functions.php FIND
- Code: Select all
function removeEvilTags($source)
{
global $allowedTags;
$source = RemoveCurseWords(strip_tags($source, $allowedTags));
return preg_replace('/<(.*?)>/ie', "'<'.removeEvilAttributes('\\1').'>'", $source);
}
REPLACE WITH
- Code: Select all
function removeEvilTags($source)
{
global $allowedTags;
$source = RemoveCurseWords(strip_tags($source, $allowedTags));
return preg_replace_callback('/<(.*?)>/i', 'removeTagAttributes', $source);
}
function removeTagAttributes($in){
return '<'.removeEvilAttributes($in).'>';
}
Note: this will only fix new comments, the ones that are broken will remain broken
PHP Melody Plugins developer
PHP Melody plugins + themes for 1.6 and 1.7-2.7 | Subscribe to news of my work | Follow me on Facebook
PHP Melody plugins + themes for 1.6 and 1.7-2.7 | Subscribe to news of my work | Follow me on Facebook
-
Trace - Verified Customer
- Posts: 2543
- Joined: Aug 16, 2010 3 pm
- Location: The Netherlands
- Reputation points: 1329
Thanks Trace !!
- adysnake
- Verified Customer
- Posts: 56
- Joined: Mar 29, 2009 4 pm
- Location: Romania
- Reputation points: 20
Thanks Trace, been upgrading my old phpmelody 1.6.x to php 7.2 and this was one of the remaining issues.
- mephisto
- Verified Customer
- Posts: 2888
- Joined: Sep 30, 2008 8 am
- Reputation points: -6
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest