Current time: 03-21-2010, 08:19 PM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] You can not use "Javascript:" in a post [C-Michael83]
10-20-2008, 12:43 PM
Post: #1
[F] You can not use "Javascript:" in a post [C-Michael83]
If you use
Code:
Javascript:
in a post you only see "J".

Example:
Javascript:

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
10-20-2008, 04:26 PM (This post was last modified: 10-20-2008 04:29 PM by Ryan Gordon.)
Post: #2
RE: You can not use "Javascript:" in a post
PHP Code:
function fix_javascript($message)
    {
        
$js_array = array(
            
"#(&\#(0*)106;|&\#(0*)74;|j)((&\#(0*)97;|&\#(0*)65;|a)(&\#(0*)118;|&\#(0*)86;|v)(&\#(0*)97;|&\#(0*)65;|a)(\s)?(&\#(0*)115;|&\#(0*)83;|s)(&\#(0*)99;|&\#(0*)67;|c)(&\#(0*)114;|&\#(0*)82;|r)(&\#(0*)105;|&\#(0*)73;|i)(&\#112;|&\#(0*)80;|p)(&\#(0*)116;|&\#(0*)84;|t)(&\#(0*)58;|\:))#i",
            
"#(o)(nmouseover\s?=)#i",
            
"#(o)(nmouseout\s?=)#i",
            
"#(o)(nmousedown\s?=)#i",
            
"#(o)(nmousemove\s?=)#i",
            
"#(o)(nmouseup\s?=)#i",
            
"#(o)(nclick\s?=)#i",
            
"#(o)(ndblclick\s?=)#i",
            
"#(o)(nload\s?=)#i",
            
"#(o)(nsubmit\s?=)#i",
            
"#(o)(nblur\s?=)#i",
            
"#(o)(nchange\s?=)#i",
            
"#(o)(nfocus\s?=)#i",
            
"#(o)(nselect\s?=)#i",
            
"#(o)(nunload\s?=)#i",
            
"#(o)(nkeypress\s?=)#i"
        
);
        
$message preg_replace($js_array"$1<strong></strong>$2"$message);

        return 
$message;
    } 

inc/class_parser.php

Looks like $2 isn't being recognized by the regex

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
10-25-2008, 01:45 AM
Post: #3
[F] You can not use "Javascript:" in a post
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user


Forum Jump: